Forum Moderators: open

Message Too Old, No Replies

Generated XML cache (?) problem.

is it my host or what?

         

phparion

10:21 am on May 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi

i am facing a very weird problem

i have a script that writes a new xml file everytime and then read it, it was working fine for the last some days now it is giving some problem, i.e

It is showing the same file for every attempt to write it, when i create new xml file it still shows the contents of old in the browser however if i download it from my space and open it then it shows the correct new contents, i dont know whether it is my host or my browser,

i tried it with IE and Opera i cleared history and also deleted internet temporary files but stil it always pick the old file ..

please help i am about to weep due to this :)

thanks

jbinbpt

10:46 am on May 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried a different computer?

BananaFish

4:55 pm on May 8, 2006 (gmt 0)

10+ Year Member



IE will often cache XML content unless you send a last-modified header. If you're using AJAX, making a post request instead of a get request will solve the cache issue.

phparion

6:55 pm on May 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi

i am not using AJAX and i tried it on other PCs it worked fine

i just generate a XML file and displays it in browser by just simple redirection ...

but it is picking old contents always

physics

1:04 am on May 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You don't have to be using AJAX to send a last-modified header. You can do this with PHP:
[us3.php.net...]
You may have to change how you return the XML file but it may fix the problem.
Are the other computers you're using in the same building or not? If not it may be your ISP that is caching the page... In any case I think last-modified should help.