Jump to content


Photo

not cache imagepng() ?


  • Please log in to reply
3 replies to this topic

#1 leeming

leeming
  • Members
  • PipPipPip
  • Advanced Member
  • 93 posts

Posted 20 October 2006 - 03:42 PM

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?
Im not perfect ;) lol

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,023 posts

Posted 20 October 2006 - 07:26 PM

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.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 leeming

leeming
  • Members
  • PipPipPip
  • Advanced Member
  • 93 posts

Posted 22 October 2006 - 03:45 AM

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.

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
Im not perfect ;) lol

#4 dark dude

dark dude
  • Members
  • PipPipPip
  • Advanced Member
  • 53 posts

Posted 22 October 2006 - 04:24 PM

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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users