Jump to content

responseText does not change


konradb

Recommended Posts

Hi everyone,

I am trying to deal with a problem for couple of days already and no success...

I have an ajax function that is supposed to wait for a change in one of a database element. At first it gets by ajax part the response '0', 'del' or some other number. If '0', it runs the function once more (by settimeout). For 'del' or other number it redirects us to another page (window.location).

Everything works just fine in Firefox or GoogleChrome, just perfect! But here comes IE... It reads the first '0' response (it always is 0 at the beginning) but then it does not see any changes. The function runs again every 2 seconds if there is no change form '0' and runs correct. But the response is still '0' even if I am sure it has changed...

Today I find out that it can be a caching problem, so I added to my index.php such lines:

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 

header("Cache-Control: no-cache, no-store, must-revalidate");

and also tried with:

header("Expires: -1"); 

header("Cache-Control: no-cache, no-store");

It didn't work and the problem still exists. Maybe some of you solved it once?

Waiting for suggestions..

 

 

Link to comment
https://forums.phpfreaks.com/topic/152090-responsetext-does-not-change/
Share on other sites

Archived

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

×
×
  • Create New...

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.