If you use a GET method
to send an asynchronous request to your server side code, Internet Explorer
will cache locally your GET request, so obviously you won't get the latest
result in your response. Firefox and Chrome doesn't seem to have this issue.
To resolve or handle cache effect issue forAjax call:
To resolve or handle cache effect issue for
·
Either
use POST method instead of GET
·
Or
add some random value to your GET request
so
instead of using like this from client side,
var getUrl = 'GetUser.aspx?username=sandeep'
use
this:
var getUrl = 'GetUser.aspx?username=sandeep' + '&rdm=' +
new Date().getTime();
This will force IE to show a fresh version of
your request all the time.
Comments
Post a Comment