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 Products

Market leading device intelligence for the web, app and MNO ecosystems
DeviceAtlas - Device Intelligence

Real-time identification of fraudulent and misrepresented traffic
DeviceAssure - Device Verification

A free tool for developers, designers and marketers to test website performance
mobiReady - Evaluate your websites’ mobile readiness

© 2024 DeviceAtlas Limited. All rights reserved.

This is a website of DeviceAtlas Limited, 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