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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.