You are here: Re: [PHP] Cache Problems « PHP « IT news, forums, messages
Re: [PHP] Cache Problems

Posted by "Richard Lynch" on 05/21/05 04:11

On Fri, May 20, 2005 12:11 pm, Rahul S. Johari said:
> My whole Auto-Image verification application and has come to get stuck at
> the Cache in IE. It¹s working fine in Safari on Mac, but IE is picking up
> the image from the Cache no matter what. I¹ve tried the following:

Are you clearing out the cache after you add these headers?

Cuz, like, if it gets IN the cache, the new headers you send don't count,
cuz it never asks for them.

> header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

Send something in the past, but not that far... It might decide to ignore
you if you lie that much.

> header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
> header("Cache-Control: no-store, no-cache, must-revalidate");
> header("Cache-Control: post-check=0, pre-check=0", false);

I think having too many of these is going to mess you up...

> header("Pragma: no-cache");
>
> Which I understood is to tell the browser not to load the page or it¹s
> images from the Cache.. But it still does. Nothing is working out. I don¹t
> know how to get that page to load fresh from the server and not IE¹s cache
> so it won¹t display the same Image over and over.

If you really want to guaranteee no cahing in all browsers for all time,
the random URL is the way to go. It's a shame that browsers will ignore
the caching headers, but since they do, I don't feel guilty making them
suck down more images then they should.

--
Like Music?
http://l-i-e.com/artists.htm

 

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

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