Jump to content


ajax pissin me off

  • Please log in to reply
2 replies to this topic

#1 jcombs_31

  • Staff Alumni
  • Advanced Member
  • 2,066 posts
  • LocationFL

Posted 05 July 2006 - 05:43 PM

I can't understand this.  I have a php script that will display a random image from a directory.  This works pefectly, it will display a random image always.  Now, i set up ajax to echo this script on another page.  Firefox always displays a random image as it should.  But IE and opera always display the same image.  It seems like there is some type of cache for the request object.  Anybody know anything about this?

BTW, I hate this new forum software.

#2 nogray

  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 05 July 2006 - 05:49 PM

most likely the page is cached and that's why it display the same image.

Try to hit "CTRL+SHIFT" and "Refresh" to see if the image reload in IE. If it works it's a cache problem.

You can fix it by adding
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past 

to your php file.


#3 deejay1111

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 06 July 2006 - 09:45 AM

do you have some source code to post here ?
get help at www.ajaxtalk.com

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users