SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict dAEk's Avatar
    Join Date
    Oct 2003
    Location
    Stockholm, Sweden
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How well do browsers support defer?

    According to W3:
    Code:
    The SCRIPT element
    <!ELEMENT SCRIPT - - %Script;          -- script statements -->
    <!ATTLIST SCRIPT
      charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
      type        %ContentType;  #REQUIRED -- content type of script language --
      src         %URI;          #IMPLIED  -- URI for an external script --
      defer       (defer)        #IMPLIED  -- UA may defer execution of script --
      >
    Attribute definitions:
    [...]
    defer [CI]
    When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no "document.write" in javascript) and thus, the user agent can continue parsing and rendering.
    I'm wondering how well different browsers support the defer attribute for script tags. I've never used 'em and now I am having trouble seeing when defer can be useful... large javascript libraries perhaps?

    Cheers,
    David Shamloo-Ekblad

    Go Habs! | For music addicts: Last.fm, SongMeanings

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,445
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)

    defer

    Interesting. I have never heard of the defer attribute before. It seems that it's only supported in IE 4+ Windows and is most useful for compressed external js files.
    http://www.websiteoptimization.com/speed/tweak/defer/

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have. I was exposed to it for the first time last month when I was working on a site for a client that had posted an ad in the Looking to Hire board of the Marketplace. It's handy.

    http://www.htmlhelp.com/reference/ht...al/script.html

  4. #4
    SitePoint Addict dAEk's Avatar
    Join Date
    Oct 2003
    Location
    Stockholm, Sweden
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll have a look at the links tomorrow. Thanks for your replies.
    David Shamloo-Ekblad

    Go Habs! | For music addicts: Last.fm, SongMeanings


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •