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

V

Victoria Clare

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
 
P

Peter Mount

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
(e-mail address removed)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top