Re: Remote Javascript file

by "tim booker" <timbooker(at)btinternet.com>

 Date:  Tue, 1 May 2001 09:07:35 +0100
 To:  "sfmalo" <sfmalo(at)msn.com>
 Cc:  "Hwg-Techniques" <hwg-techniques(at)hwg.org>
 References:  oemcomputer
  todo: View Thread, Original
> The code stretches w-a-a-a-a-y down the prototype page I've set up. Would
it
> be better to put this into an external remote JS file?

Yes.


> Wouldn't that make
> the html page(s) load faster?

Only if you are using it on multiple pages, because the script only needs to
load once.


> If so, would I create the JS remote file the
> same way as a remote CSS file (just the code, no tags)?

Yes.


> Would it act the
> same way as a CSS remote file?

Basically.


> What would be the tag I enter in the prototype page to call this remote
> file?

<script type="text/javascript" language="javascript"
src="whatever.js"></script>


> And would I put the tag  in the <head> tag just like the CSS remote
> file?

Yes.


> Also, what about folks surfing with JS disabled? Would this make the site
> unnavigable?

In the case of image rollovers, no.  The images will just appear normally,
but without the rollover events.

Tim



www.timbooker.com

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA