By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,568 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,568 IT Pros & Developers. It's quick & easy.

FAQ Topic - Why is my AJAX page not updated properly when using an HTTP GET request in Internet Explorer? (2008-07-29)

P: n/a
-----------------------------------------------------------------------
FAQ Topic - Why is my AJAX page not updated properly when
using an HTTP GET request in Internet Explorer?
-----------------------------------------------------------------------

Microsoft Internet Explorer caches the results of HTTP GET requests. To ensure that the
document is retrieved from the server, you will need to use the POST Method.

http://msdn2.microsoft.com/en-us/library/ms536648.aspx
--
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://jibbering.com/faq/index.html.
The FAQ workers are a group of volunteers. The sendings of these
daily posts are proficiently hosted by http://www.pair.com.

Jul 28 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Jul 28, 4:00 pm, "FAQ server" <javascr...@dotinternet.bewrote:
-----------------------------------------------------------------------
FAQ Topic - Why is my AJAX page not updated properly when
using an HTTP GET request in Internet Explorer?
-----------------------------------------------------------------------

Microsoft Internet Explorer caches the results of HTTP GET requests. To ensure that the
document is retrieved from the server, you will need to use the POST Method.

http://msdn2.microsoft.com/en-us/library/ms536648.aspx
It is possible to do the following to avoid the cache

GET http://example.com/foo?id=1234
GET http://example.com/foo?id=542

Peter
Jul 29 '08 #2

P: n/a
MC

"FAQ server" <ja********@dotinternet.bewrote in message
news:48***********************@news.sunsite.dk...
-----------------------------------------------------------------------
FAQ Topic - Why is my AJAX page not updated properly when
using an HTTP GET request in Internet Explorer?
-----------------------------------------------------------------------

Microsoft Internet Explorer caches the results of HTTP GET requests. To
ensure that the
document is retrieved from the server, you will need to use the POST
Method.

http://msdn2.microsoft.com/en-us/library/ms536648.aspx
--
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://jibbering.com/faq/index.html.
The FAQ workers are a group of volunteers. The sendings of these
daily posts are proficiently hosted by http://www.pair.com.
This will also work as it generates a unique request every time.
MC

var date = new Date();
var postString = 'someParms=xyz&GMT=' + date.toGMTString();
http.open("POST", "/mypage.html");
http.send(postString);
Jul 29 '08 #3

P: n/a
On Jul 29, 9:15 am, "MC" <mica[removethis]@aisus.comwrote:
"FAQ server" <javascr...@dotinternet.bewrote in message

news:48***********************@news.sunsite.dk...
-----------------------------------------------------------------------
FAQ Topic - Why is my AJAX page not updated properly when
using an HTTP GET request in Internet Explorer?
-----------------------------------------------------------------------
Microsoft Internet Explorer caches the results of HTTP GET requests. To
ensure that the
document is retrieved from the server, you will need to use the POST
Method.
[snip]
This will also work as it generates a unique request every time.
MC

var date = new Date();
var postString = 'someParms=xyz&GMT=' + date.toGMTString();
http.open("POST", "/mypage.html");
http.send(postString);
The FAQ answer is suggesting using POST.

I found some browsers where the third argument to xhr.open is not
optional. Cannot remember which. Probably slightly older browsers.

Peter
Jul 29 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.