Suckerfish & .js delay with IE - preload external .js?

Discussion in 'HTML' started by Victoria Clare, Aug 10, 2004.

  1. Using the revised suckerfish dropdown javascript from

    http://www.htmldog.com/articles/suckerfish/dropdowns/

    I find that my dropdowns don't drop first time in IE.


    This seems to be because I moved the javascript to an external file. The
    rest of the page and all included files load before the script is ready
    to play.

    The load order looks like:
    1) page content
    2) images early in code
    3) css
    4) images lower down in code
    5) and only when everything else is done - external javascript


    Although filesizes aren't too huge (40Kb including css, images and text)
    the load delay of the dropdowns is long enough that on a dialup or ISDN
    connection (and with an impatient turn of mind) they are noticeably 'not
    working' the first time you mouse over (another mouseover, or let the
    page load fully, and it works)

    The external .js link is right at the top of the html file, and does not
    use the 'delay' attribute.

    Is it possible to tell IE to load the external js before the images? Or
    should I get a life and just bung the js back into the page?

    Am I on the wrong track altogether ?

    Victoria
     
    Victoria Clare, Aug 10, 2004
    #1
    1. Advertising

  2. Victoria Clare

    Peter Mount Guest

    Hi

    How long does the page take to load? I would stick to having an external
    javascript file as that is the most efficient way to do it.

    If anything I'd be looking at the sizes of the images to see how they
    are slowing down the page loading. I read somewhere about a trick with
    preloading images on the home page. The idea is to put them way down on
    the page, size them in the html down to 1px by 1px (so they are only a
    dot). That way when the page loads the image is cached in the client
    computer and when the page with the "full size" version of the picture
    is loaded it doesn't take too long to load because it's already been
    cached. I haven't tried it myself so I don't know how well it works. I
    think it might have been a technique described by "Robin Williams"
    author of books like "The Non-Designer's Web Book".

    Have a good day

    Peter Mount


    Victoria Clare wrote:

    > Using the revised suckerfish dropdown javascript from
    >
    > http://www.htmldog.com/articles/suckerfish/dropdowns/
    >
    > I find that my dropdowns don't drop first time in IE.
    >
    >
    > This seems to be because I moved the javascript to an external file. The
    > rest of the page and all included files load before the script is ready
    > to play.
    >
    > The load order looks like:
    > 1) page content
    > 2) images early in code
    > 3) css
    > 4) images lower down in code
    > 5) and only when everything else is done - external javascript
    >
    >
    > Although filesizes aren't too huge (40Kb including css, images and text)
    > the load delay of the dropdowns is long enough that on a dialup or ISDN
    > connection (and with an impatient turn of mind) they are noticeably 'not
    > working' the first time you mouse over (another mouseover, or let the
    > page load fully, and it works)
    >
    > The external .js link is right at the top of the html file, and does not
    > use the 'delay' attribute.
    >
    > Is it possible to tell IE to load the external js before the images? Or
    > should I get a life and just bung the js back into the page?
    >
    > Am I on the wrong track altogether ?
    >
    > Victoria
    >
    >
    >
    >
     
    Peter Mount, Aug 16, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neo Geshel
    Replies:
    81
    Views:
    2,921
    diecleartype
    Jul 10, 2006
  2. Neo Geshel
    Replies:
    6
    Views:
    505
    Neo Geshel
    Oct 24, 2004
  3. Richard
    Replies:
    10
    Views:
    882
    Steve Pugh
    Mar 4, 2005
  4. the idiot

    suckerfish elastic width thing

    the idiot, Sep 21, 2005, in forum: HTML
    Replies:
    3
    Views:
    569
    the idiot
    Sep 22, 2005
  5. Chris

    Son of Suckerfish

    Chris, Jul 15, 2006, in forum: HTML
    Replies:
    2
    Views:
    459
    Usenet
    Jul 16, 2006
Loading...

Share This Page