Welcome to WebmasterWorld Guest from 23.20.137.66

Forum Moderators: open

Message Too Old, No Replies

How to defer parsing javascript

     
2:33 pm on Mar 31, 2013 (gmt 0)



I was add defer to code but it is not validation. Anyone help me, please ?
My code:
<script src=" http://example.com/ demo_defer.js" defer> </script>

[edited by: bill at 7:42 am (utc) on Apr 1, 2013]
[edit reason] Use example.com [/edit]

12:34 am on Apr 1, 2013 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



If validating as xhtml use

<script src="example.js" defer="defer"></script>
6:09 pm on Apr 4, 2013 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Try using asynchronous loading with LABjs, head.js, control.js or something like that. This will speed up the feel a lot, everything will load as quickly as possible and run as soon as ready.

One caveat: you can't do asynch loading on anything that uses document.write()
 

Featured Threads

Hot Threads This Week

Hot Threads This Month