Jump to content

Archived

This topic is now archived and is closed to further replies.

leeming

not cache imagepng() ?

Recommended Posts

i have this picture that is made using the imagepng() function.. but im having a few users report to me that they are seeing an outdated version of the picture (and im guessing its cos its been cache on their machine).. is there any way i can made it so this doesnt happen?

Share this post


Link to post
Share on other sites
Are you using imagepng($im, $filename) to write the the image to a file then displaying the resultant file

<img src='filename.png'>

or are you displaying the dynamic image

<img src='myimage.php'>

I was under the impression that if it's the latter it cannot be cached as the image file doesn't exist until it is created on-the-fly.

Share this post


Link to post
Share on other sites
[quote author=Barand link=topic=112131.msg455136#msg455136 date=1161372394]
Are you using imagepng($im, $filename) to write the the image to a file then displaying the resultant file

<img src='filename.png'>

or are you displaying the dynamic image

<img src='myimage.php'>

I was under the impression that if it's the latter it cannot be cached as the image file doesn't exist until it is created on-the-fly.
[/quote]
its shown as a .png, because it saves load time every time a page is viewed... and the picture is only updated as updates happen

Share this post


Link to post
Share on other sites
Not sure if this might work, but have you tried using the <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> html tag?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.