South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
@disclaimer blablablabla
For the record (while I'm on the topic of cleaning up), put your CSS before your javascript - particularly for jQuery, which may change the CSS properties.
... and can be used across multiple pages, and can be cached to enhance performance on subsequent calls.Yup. It's an old standard that I've been following for yonks now. First link to CSS files, then link to client-side scripts and finally declare any ad-hoc scripts specific to the page. I prefer to put the scripts in a separate JS file though. Saves a wee bit of bandwidth and makes the page source appear cleaner.
You don't perhaps mean "reused"?No, not really. Even page-specific scripts can be reloaded, and not having to reload that script could make the 200ms difference that keeps your user's attention.
Thanks, waiting about 800ms for it to load now...Check out http://googleblog.blogspot.com/2009/06/lets-make-web-faster.html for an interesting project on Google Code, btw.
Nope, reloaded - although I meant the page, not the script.You don't perhaps mean "reused"?
Nope, reloaded - although I meant the page, not the script.![]()