473,396 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Do Browser's cache .JS files?

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
Jul 23 '05 #1
4 10416
harry wrote:
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?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2
Randy, the app is a Intranet program & users are likely to be viewing
several (5+) pages per visit!

"Randy Webb" <hi************@aol.com> wrote in message
news:F5********************@comcast.com...
harry wrote:
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?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #3
harry wrote:
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.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #4
harry wrote:
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 <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: GameDev | last post by:
I have a section of my website where customers can login and download a few select files. The download links are to php scripts that decide which files to download. Generally it works fine....
21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
1
by: Flyfish | last post by:
Hi, wondering if would be possible to find out what files are cached in browser cache (temporary internet files) when using Webbrowser control? What about read files list? (e.g. what images...
2
by: Peter Row | last post by:
Hi, I have a site were the pages are dynamically generated on demand. These pages like any static html page may contain image tags and references to CSS files. All the images and CSS files...
2
by: Freddy | last post by:
Hi, The registration process in our web site is of 3 step process spanning 3 pages and it is performed on https. I have noticed in some websites while doing credit card payments if we click...
9
by: WRH | last post by:
Hello I am new to asp but I made some Jscript functions which work fine. The functions contain some strings used as a registration key for some apps. It is important that these strings not be...
6
by: ernesto.tejeda | last post by:
Hello, I have a couple of questions regarding the loading of .js files for the browser and would like anyone to point me wher to find the answer (or if you know the answer and tell me will do just...
1
by: Kfir Marouani | last post by:
Hi, I'm trying to delete files from the browser's cache by doing this: DirectoryInfo di = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)); foreach...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.