Using SCRIPT’s defer Attribute
One of the seldom used attributes within the HTML tag library is the defer attribute on SCRIPT elements. As you can probably tell by the name of the attribute, defer instructs the contents of the script tag to not execute until the page has loaded. Take a look!
Deferring Your Scripts
//do stuff (runs first)
//do stuff, but defer it (runs last)
//do more stuff (runs second)
The deferred SCRIPT element's code will execute once the rest of the page's resources have loaded. What does this mean? Be sure that your document doesn't rely on any of the code within the script during page load. In the example above, the middle block will execute once the page has loaded even though it appears before the last block.
Olivier Rochard has written an outstanding (and more detailed) post about using the defer attribute on the Mozilla Hacks blog. His post details browser support (and quality of browser support...or lack thereof), advanced examples, and tips for using the defer attribute.
What I find funny about this tag is that it seems as though most of the script I see should be using this attribute.
With Firefox OS, asm.js, and the push for browser performance improvements, canvas and WebGL technologies are opening a world of possibilities. I featured 9 Mind-Blowing Canvas Demos and then took it up a level with 9 Mind-Blowing WebGL Demos, but I want to outdo...
The MooTools Accordion plugin seems to be the plugin that people seem to have the most problems with. It's an awesome plugin, so I can see why so many people want to use it, but I think that may be part of the problem....
A while back David Walsh published a list of
7 MooTools Plugins You Should Use on Every Website
which included 'AutoGrow' a text area expander plugin. 'AutoGrow' is very similar in results to the class I wrote for Education.com, Flext. I decided to release this...
Let's all be honest for a moment: we've all ... not paid for ... music. Whether it was via a file sharing app like Kazaa or Napster, or it was downloading and seeding on bittorrent, or maybe even downloading a music video and ripping its audio,...
I'll be first person to admit I don't do as much git repository maintenance as I should. I rarely delete branches which have been merged, so a
git branch execution shows me a mile-long list of branches that likely aren't relevant. The best way to find branches I've recently...
Looking for the right resources to help you satisfy the needs of your clients? On the lookout for the best tools to help you increase your revenue? Searching for the right software to help you improve your business? Well, then you’ve come to the right place....