Do Browser's cache .JS files?

H

harry

Using IE 5.5(sp2) no other!

I have several .js files that are included in various jsp pages.

I've read somewhere(can't remember where?) that the browser caches .js
files.

If this is the case is it better to include all of them in the 1st page of
my app regardless if they're used in this page & take a performance hit
once? - or am I missing something?

thanks

harry
 
R

Randy Webb

harry said:
Using IE 5.5(sp2) no other!

I have several .js files that are included in various jsp pages.

I've read somewhere(can't remember where?) that the browser caches .js
files.

If this is the case is it better to include all of them in the 1st page of
my app regardless if they're used in this page & take a performance hit
once? - or am I missing something?

Load the page. Look in your cache folders. If there are .js files there,
it caches them, if there aren't, then it doesn't. Pretty easy to test.

And while loading them all on the first page might have its advantages
by speeding up subsequent pages, its a disadvantage as well. Why should
I, as a user, have to sit through a download (performance hit) so that I
can see 1 or 2 pages, yet have to download the .js for the entire site?
 
H

harry

Randy, the app is a Intranet program & users are likely to be viewing
several (5+) pages per visit!
 
R

Randy Webb

harry said:
Randy, the app is a Intranet program & users are likely to be viewing
several (5+) pages per visit!


The FAQ is in my signature, you should read it until you understand it.

As for your question, it depends on how the users cache settings are set.
 
G

Grant Wagner

harry said:
Using IE 5.5(sp2) no other!

I have several .js files that are included in various jsp pages.

I've read somewhere(can't remember where?) that the browser caches .js
files.

If this is the case is it better to include all of them in the 1st page of
my app regardless if they're used in this page & take a performance hit
once? - or am I missing something?

thanks

harry

Unless you are using the IEAK to lock down the settings your user community
can change, the browser caching behaviour is controlled by the user of the
browser. In Internet Explorer 5.5 Service Pack 2, go to Tools -> Internet
Options -> Settings... -> General tab -> the radio select under "Check for
newer versions of stored pages" controls when and how the browser caches
documents.

Caching behaviour can also be controlled by headers sent from the server, but
I would imagine that's not an issue (unless you've got your Web server
configured to tell browsers to never cache files ending in .js).

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 

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,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top