Good Website Inspector

making the web better

Rules

Rule: Minify Javascripts

Minifying of scripts results in faster page load time, because the total bytes send to the end user will be decreased.

You should minify all external javascript files and internal javascript snippets for an effective reduce of the byte size.

Rule: Javascript should not placed in <head>

Avoid usage of javascript placed in document <head> because the rendering of the page will not start until the above placed javascript were completely executed. Javascript should be placed at the bottom of your document near the closing </body> tag.

Rule: Place Javascripts at bottom of the site

Avoid usage of javascript placed in the top or middle of the document body because the rendering of the page will stop until the placed javascript were completely executed.

Javascript should be placed at the bottom of your document near the closing </body> tag.

Rule: Avoid usage of document.write(ln)

Avoid using document.write or document.writeln in the javascript because it will block the rendering of the website until the full javascript before was executed and the DOM of the page was written. If the page contains display ads, most ad distributors serve ads with the old document.write statement except Google AdWords.

The right way for site specific javascripts is to use the DOM (Document Object Model) methods to manipulate the page content. DOM Methods can return complete HTML structures which can be injected after the full rendering of the site so the developer can place the javascript snippet at the bottom of the page near the closing <body> tag.

Rule: Use asynchronous javascript loading

The usage of asynchronous loading results in a very fast load time and rendering of the page. The user impact is very strong because good asynchronous loading won't block the rendering process and the feeled page load time is heavily decreased. Images and other displayed items regulary will be shown as of no javascript is loaded.

Rule: No Inline Javascript

Inline javascripts within a total byte size of 512 or more should be avoided for effective caching. Javascripts should be placed in external files with a far expire header for an optimal caching result with increased page load time.

This will be result in a better maintenance and a lower page load time for returning visitors because the browser have already loaded and cached the javascripts.

Rule: Use <noscript> tags

The usage of noscript tags shows alternate content for users with devices without or disabled javascript -- often cell phones or robots.

At least the noscript tag for page tracking should be set. If the page uses a javascript only navigation a noscript tag shoud contains the complete navigation as html construct for search engines or other javascript disabled devices.

Der Good Website Inspector wurde von Hubert Burda Media entwickelt.
Autor: Stefan Seifarth, Media Innovation Lab GmbH, Hubert Burda Media, Impressum & Datenschutz