Demo of static Javascript script loading
by Eric Bréchemier

Google Ads Block #1

In this example, I load three blocks of Google Ads, an Amazon Widget and the Google Analytics script in a static way, using regular script tags.

Google Ads Block #2

With static scripts,
this page loaded in:
ms

About

This demonstration was set up by Eric Bréchemier, Freelance Software Designer. It results from extensive research on browsers behaviors with regards to script loading, with one goal in mind: being able to defer the loading of legacy third party scripts still using the ill-famed document.write method.

Since any call to the document.write method after page load will reset the document to a blank page, it had to be replaced with a convincing equivalent. This is the role played by bezen.domwrite, a module part of the bezen.org Javascript library, which simulates document.write and safeguards the document.

Amazon Widget

See also

In this page, bezen.domwrite is not used, and scripts are loaded in a static way. Check how the same scripts can be loaded dynamically by relying on bezen.domwrite in combination with a script loader:

Google Ads Block #3

Google Analytics

The Google Analytics script: is not loaded yet