Fixit – Inline JavaScript

This test determines if your page make use of inline JavaScript code. Requiring the browser to pass markup for JavaScript code slows processing and makes web applications increasingly brittle. Moving all JavaScript code to dedicated JavaScript include files provides a clean seperation of markup, style and code.

Checking for inline JavaScript

This test checks to see if any inline JavaScript code is detected on the page. Inline code will take the form of “javascript:” links, “onclick” style handlers and similar markup. If any such inline code fragments are found, then the test reports a FAIL.

If you receive a FAIL for this test, you should consider moving all JavaScript code to specific JavaScript include files instead.

 

Reference

This test is based on a W3C mobileOK best practice. See http://www.w3.org/TR/mobile-bp/ for more details.

Leave a Reply

Exclusive tips, how-tos, news and comment

Receive monthly updates on the world of mobile dev.

Other Afilias Products

Try the world’s leading device detection solution at
DeviceAtlas - Try the world’s leading mobile device detection solution

Evaluate your websites’ mobile readiness with
mobiReady - Evaluate your websites’ mobile readiness.

© 2019 Afilias Technologies Ltd. All rights reserved.

This is a website of Afilias Technologies Ltd, a private company limited by shares, incorporated and registered in the Republic of Ireland with registered number 398040 and registered office at 6th Floor, 2 Grand Canal Square, Dublin 2, Ireland