Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Verifying that external js successfully downloaded


Message #1 by HeadElf@E... on Sun, 17 Nov 2002 23:16:09
In reviewing my log files I've noticed that a few times a day external 
javascript files do not download onto the users' systems because the 
server hiccups.

Is anyone aware of a script that would (a) verify that the js downloaded 
and (b) force it to download if the first attempt failed?

I've run a search here and elsewhere (google groups etc.) to no avail and 
I'm afraid that this sinus medication has my head in a fog on how to do 
this from scratch (I guess I need Rudolph the red-nose script writer ;).

BTW, I'm using the external js as a way to speed up d/load time, decrease 
bandwidth usage and improve search engine ranking.  Just put any non-
critical, repeating html (e.g. footers, feedback links and other site 
marketing tools) into a js & then use good old "document.write" to read 
the html back into all the pages.  While there are a number of reasons I 
wouldn't do this for critical code, it can make a very noticeable 
difference e.g. it dropped some file sizes by 20%.  (And who says Santa 
doesn't give presents to 'older' kids ;)

Merry Christmas!

  Return to Index