You are here: Re: Question about browser Cache and Webpages « All PHP « IT news, forums, messages
Re: Question about browser Cache and Webpages

Posted by Drakazz on 05/20/06 10:39

I am not a native english speaker, but thanks for guessing! :)

I will need to test out this.
Basically, if the images are cached, they may be dependent only on
their own headers. Of course, this depends on the browser you're using.

Ok, so I tested it just now.
And I am correct (at least for Opera web browser!).

The actual page which gives an <img> link to the image is set to be not
cached. The image doesn't send any particular headers and is still
cached, even though I click the link to the same page few times. If i
refresh, the image is redownloaded. But the client won't bother with
refreshing, to get all new images!

The page itself is not cached and shows the correct date. The image
doesn't (it's cached) ; it outputs the date.

If a add a random text generator after the image's name (mm.php),
making it be mm.php?randomstring (randomstring changes every time
clicked on the link).

So basically, the problem is that the client still caches the images
and the browser does specific cache only for the document itself and
not for it's links!

I jsut now tested on Firefox, seems like it works different than Opera
and doesn't cache the images, at all. I am not sure about IE (I do not
have it on my PC).

So to make it work for every user, you'd have to add a random string
generator or whatever after the image name :)
I've also tried adding cache to the html page's headers but it had no
effect whatsoever on Firefox!

I am not sure about IE, i remember it caching images more than
redownloading them.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация