Web Hosting Directory | Web Hosting Resources | Webmaster Resources | Domain Tools | Search Engine Marketing | Forums
  Signup
Today: 1,042   Yesterday: 1,235   Max: 1,872   Total: 482,019   Current Users : 19 (Member 0) 
DOMAIN TOOLS

WEBMASTER TOOLS

RELATED ARTICLES

SUBMIT AN ARTICLE

Write for us and get publicity, link to your website, and best of all get paid. Please visit our writers page for details.


LINK TO US

Link to us and earn points for each visitor you bring to us. Please visit our link partner page for details.

 

Attribute for <SCRIPT ...>
DEFER

Usage Recommendation
use it, but don't rely on it

By default, when you use <SCRIPT SRC="..."> to load an external script into the page, the browser halts processing the page until the external script is retrieved and executed. DEFER tells the browser not to wait for the script to load before going ahead and processing the rest of the page. The browser will load the script in the background while continuing to process the page.

DEFER, which is currently only supported by MSIE 5, is useful for situations where the script does not write anything to the page (i.e. does not use document.write()). In those situations it is better to let the user see the page while the sacript.

For example, the following code indicates that the page should load the delscript.js script, but should do so in the background. delscript.js takes at least ten seconds to load (it was designed that way to simulate a lengthy download).

this code produces this
<SCRIPT 
   SRC="../cgi-bin/delscript.js" 
   DEFER
   ></SCRIPT>
this page



Copyright 1997-2002 Idocs, Inc. Written by Miko Sullivan.

 
 
 
What is your major source of website traffic?
 
 
 
 
 
 

ADVERTISEMENT

 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2008 Broadband Media, Inc. All rights reserved.