Two minor JavaScript-testing questions

L

Lawrence San

I'm trying to test some simple JavaScript meant to speed up the display
of my Web pages for readers using modems, but I have a fast DSL
connection and I'm having trouble visualizing how effective the code
is. Does anybody know of software that will simulate modem speed over a
DSL connection -- i.e., temporarily slow down the speed of my
connection, or the speed at which the browser uses the connection? (I
author on a Mac but test on a PC -- I'm mostly interested in slowing
down IE6 on Windows since that's what most people use.) I've searched
but could not find such software. (I don't have a real 56K modem that
can be used for this purpose.)

My second question involves actually looking at the list of files that
have loaded into the browser's cache. Windows IE6 seems to be the only
one of my test browsers that lets me do this. Mac IE5 puts all the
cache files into one big file that's opaque to me; Windows Netscape 6
loads them as separate files, but renames the cache files to gibberish
that I can't decipher.

Is there a way to actually see what files are getting cached in these
other browsers? Am I missing something?

Thanks much,
San
 
G

Grant Wagner

Lawrence said:
I'm trying to test some simple JavaScript meant to speed up the display
of my Web pages for readers using modems, but I have a fast DSL
connection and I'm having trouble visualizing how effective the code
is. Does anybody know of software that will simulate modem speed over a
DSL connection -- i.e., temporarily slow down the speed of my
connection, or the speed at which the browser uses the connection? (I
author on a Mac but test on a PC -- I'm mostly interested in slowing
down IE6 on Windows since that's what most people use.) I've searched
but could not find such software. (I don't have a real 56K modem that
can be used for this purpose.)

My second question involves actually looking at the list of files that
have loaded into the browser's cache. Windows IE6 seems to be the only
one of my test browsers that lets me do this. Mac IE5 puts all the
cache files into one big file that's opaque to me; Windows Netscape 6
loads them as separate files, but renames the cache files to gibberish
that I can't decipher.

Is there a way to actually see what files are getting cached in these
other browsers? Am I missing something?

Thanks much,
San

What gets cached is a combination of server headers, intervening proxies
and client user agent settings. You can only control the server headers to
ensure that .js files are not configured to send "Expires: ...",
"Cache-control: ... " or "Pragma: no-cache" headers (or if the server is
sending Cache-control: headers, they are correct) <url:
http://www.mnot.net/cache_docs/#CONTROL />. My guess is that your server is
configured correctly, it would take explicit action on the part of the Web
server administrator to change those settings.

You have no control over what any proxies between your server and the
client might do, so I won't bother discussing it (although you *can*
control some proxies to some extent with appropriate Cache-control: server
headers).

That leaves client user agent cache settings, which you also have NO
control over. However, as long as the user has left the user agent
(browser) configured as installed, the browser will be caching any files
you send it.

IE: Tools -> Internet Options -> General tab -> Settings -> Automatically
Netscape 4: Edit -> Preferences -> Advanced -> Cache -> Once per session
Firefox: No internal setting to control caching, but there are Extensions
that can provide this functionality. From my use of this browser, it's
obvious to me it refreshes the local cached copy when it detects the server
copy is out of date.
Mozilla 1.6: Edit -> Preferences -> Advanced -> Cache -> When the page is
out of date
Opera 7.5: Tools -> Preferences -> Network -> History and cache -> Check
documents, Check images, Check other (which is the dopiest way to handle
caching I've ever seen, but whatever)
etc
etc
etc

As you can see, and as I said, all you can control is the server. Ensure it
is configured correctly. After that, caching behaviour will be the combined
result of any proxies the page has to pass through and the client's user
agent cache settings. If the user has their user agent configured
correctly, it will cache, if they don't, it won't.

--
| 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
 
L

Lawrence San

Thank you for your comments about servers, server headings, proxies,
and user agent settings. However, my questions were (1) whether anyone
knows of software to slow down a broadband connection, and (2) how to
examine the contents of the rather opaque cache directories of a few
specific browsers (see my original query below).

Anybody know?

Thanks,
San
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top