homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

How to defer parsing javascript

Msg#: 4560016 posted 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]



WebmasterWorld Senior Member 5+ Year Member

Msg#: 4560016 posted 12:34 am on Apr 1, 2013 (gmt 0)

If validating as xhtml use

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


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

Msg#: 4560016 posted 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