SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
-
Apr 25, 2001, 18:43 #1
- Join Date
- Oct 1999
- Location
- Vancouver, BC, Canada
- Posts
- 983
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
My client has designed a very graphic intensive (read: +130kb) page for their site template. Besides having to use frames, I'm trying to identify any other issues.
One question I have: Typically, once the initial page loads, the graphics will remain in cache, right? So when other pages load, the browser will retrieve the stored graphic, and not go to the server all over again.. is that right? Does this scenario change if the user has set their browser in any way? (ie: check for new page at every visit, etc..)
Thanks.- A simple online WYSIWYG editor for HTML code snippets.
- Managed Web Hosting - $3.95/month (resellers welcome)
- Why pay more? $8.95 domains & $9.95 SSL certificates!
-
Apr 25, 2001, 21:11 #2
- Join Date
- Jul 2000
- Location
- 80,000 feet below the surface
- Posts
- 1,442
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by hstraf
One question I have: Typically, once the initial page loads, the graphics will remain in cache, right?
So when other pages load, the browser will retrieve the stored graphic, and not go to the server all over again.. is that right?
So if you have one page with <img src="picture.jpg"> and another page which has <img src="images/picture.jpg"> and yet another page which has <img src="/images/picture.jpg">, then the image will be loaded three times direct from the server, not the cache because each image has been referenced differently.
Does this scenario change if the user has set their browser in any way? (ie: check for new page at every visit, etc..)
And yes, it also depends on your browser's settings.... If you have "check for new page at every visit" then the browser will go direct to the server every time.
-
Apr 26, 2001, 07:11 #3
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That was a brilliant reply BC. Didn't knew about the proxy thing
"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Apr 26, 2001, 18:57 #4
- Join Date
- Jul 2000
- Location
- 80,000 feet below the surface
- Posts
- 1,442
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by lynlimz
That was a brilliant reply BC. Didn't knew about the proxy thing
-
Apr 26, 2001, 19:44 #5
- Join Date
- Feb 2001
- Location
- Melbourne Australia
- Posts
- 6,282
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Also, it depends on whether the server is sending out validators with the image...
It the server sends out an Expires: or Cache-Control: line in the header, it tells the proxy or browser cache exactly how long the cached image is valid.
Most modern browsers will, if they received no validator, keep the image in the cache for one browser session only. [note: this applies to IE even when you have it set to NEVER]
Here's a handy tool to see what headers your server is sending out with the image. Put the IMAGE's url.
http://www.delorie.com/web/headers.htmlLast edited by mmj; Apr 27, 2001 at 04:06.
[mmj] My magic jigsaw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Bit Depth Blog · Twitter · Contact me
Neon Javascript Framework · Jokes · Android stuff
-
Apr 27, 2001, 00:28 #6
- Join Date
- Jul 2000
- Location
- Singapore
- Posts
- 2,103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Nice resource mmj.
Ha! It would do good for me to have some server administration I guess....=)"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
-- Albert Einstein
-
Jun 3, 2001, 22:42 #7
- Join Date
- Mar 2001
- Location
- Melbourne, Australia
- Posts
- 1,039
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by mmj
Also, it depends on whether the server is sending out validators with the image...
It the server sends out an Expires: or Cache-Control: line in the header, it tells the proxy or browser cache exactly how long the cached image is valid.
Most modern browsers will, if they received no validator, keep the image in the cache for one browser session only. [note: this applies to IE even when you have it set to NEVER]
Here's a handy tool to see what headers your server is sending out with the image. Put the IMAGE's url.
http://www.delorie.com/web/headers.html
Do you know a reliable way for browsers NOT to cache images? I'm using an image upload routine from a form (with help from PHP), but when the upload completes, the old image is displayed instead of the one I just replaced it with - until I click refresh/reload.
I thought that these good old meta tags should work:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
I've even put them in the header AND footer of my HTML page as recommended here:
http://htmlgoodies.earthweb.com/beyond/nocache.html
...but still my old image insists on being displayed until I click refresh. Any suggestions?
Thanks.
Bookmarks