homepage Welcome to WebmasterWorld Guest from 54.204.94.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
How to defer parsing javascript
trihung




msg:4560018
 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]

 

daveVk




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

If validating as xhtml use

<script src="example.js" defer="defer"></script>

ergophobe




msg:4561439
 6:09 pm on Apr 4, 2013 (gmt 0)

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()

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved