Give your web page a WEDJE
I came across a post that discussed an age old problem, reducing draw times for JavaScript widgets on external sites. As a widget and web site developer I’ve seen this time and time again; the publisher embeds the JavaScript code into their pages. When the JavaScript file producing server becomes slow or un-responsive the publishing web page barely gets drawn and visitors become impatient and leave.
Mike Davidson with consultation from Intern Rob have published a post Widget Enabled DOM JavaScript Embedding which can be found at WEDJE . They also recognize the implications of bad JavaScript includes and even cross-browser incompatibilities. Their solution to these is thus coined WEDJE.
In short the solution surrounds creating a standard div element in the page and then utilizing the DOM elements to create a script element within. Their post simulates a slow loading server and their pages still fully loads and when the 7 second delay is up their widget appears.
I will definitely have to explore the WEDJE pattern some more. Definitely review the comments as there are some further examples that are worth taking a stab at. I had to laugh as I wrote this article on Widget Enabled DOM JavaScript Embedding because I realized that the WEDJE acronym sounds like Wedge.
Subscribe