Jump to content


Photo

dynamic images IE problem


  • Please log in to reply
2 replies to this topic

#1 rjlowe

rjlowe
  • New Members
  • Pip
  • Newbie
  • 4 posts
  • LocationAlbuquerque

Posted 27 February 2006 - 09:26 PM

OK here's the deal,

I have a script that I use to upload images and then provide the user with <form> buttons to rotate the image if needed. It works great in FireFox and Opera, but IE refuses to reload the image when the <form> button is pressed. If I use the "Refresh" button, however, then the image updates (and rotates one more iteration - ugh). Is there a way to FORCE IE to reload an image instead of using it's cache?

I've tried:

<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>

and that didn't do anything... I've also tried various tags for the img itself such as just plain HTML, or throwing some php in ( like echo "<img src=".$src.">"; ) and that didn't do anything either.... My main userbase is going to be IE, so just using FF or O isn't really an option either...

Another (bad) option would be to change the name of the image in order to force/trick IE into thinking it's a new image file... I would really prefer NOT to do this.

Thanks y'all :P


#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 27 February 2006 - 10:30 PM

You can 'trick' browsers into a fresh download if they think it's a different image. Easy way to do that is to give the browser an image name like sameoldimage.jpg?xyz=randomnumber.
Legend has it that reading the manual never killed anyone.
My site

#3 rjlowe

rjlowe
  • New Members
  • Pip
  • Newbie
  • 4 posts
  • LocationAlbuquerque

Posted 27 February 2006 - 10:39 PM

SWEET! That worked like a charm! Thx! :D


[!--quoteo(post=350021:date=Feb 27 2006, 03:30 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Feb 27 2006, 03:30 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
You can 'trick' browsers into a fresh download if they think it's a different image. Easy way to do that is to give the browser an image name like sameoldimage.jpg?xyz=randomnumber.
[/quote]





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users