NYCPHP Meetup

NYPHP.org

[nycphp-talk] Prevent (IE) browser cache of image

Jakob Buchgraber jakob.buchgraber at googlemail.com
Fri Apr 6 10:10:20 EDT 2007


Aaron Fischer wrote:
> Hi there,
>
> I have a little app that is a pseudo-day-planner.  Users can enter 
> appointments via a form and then I use PHP and GD to write the 
> appointment blocks onto a calendar image.
>
> It works great in Safari on Mac and Firefox on PC.  However, it 
> doesn't work with Internet Explorer on PC.  It appears that the issue 
> is that IE is not loading a fresh version of the calendar image each 
> time a change is made.
>
> How can I force IE to load a fresh version of the image, either via 
> PHP or HTML/HTTP code?
>
> Thanks!
>
> -Aaron
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
Just add a unique string to the URL of the image

<img src="createImg.php?<?php echo time(); ?>" />

So the URL of the string changes every time the user reloads the page

Cheers,
Jay

-- 
Join Linuxfriendlyhardware.org project on irc.freenode.org#lfh (german)
Registered Linux User #373457




More information about the talk mailing list