Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FAQ Topic - Why is my Ajax page not updated properly when using an HTTP GET request in Internet Explorer? (2013-04-25)

4 views
Skip to first unread message

FAQ server

unread,
Apr 24, 2013, 7:00:00 PM4/24/13
to
-----------------------------------------------------------------------
FAQ Topic - Why is my Ajax page not updated properly when
using an HTTP GET request in Internet Explorer?
-----------------------------------------------------------------------

Browsers cache the results of HTTP requests to reduce network traffic.
To force the browser to request the document from the server, either
set the `EXPIRES` and/or `CACHE-CONTROL` response header(s)
with a past date or use a unique query string.

req.open("GET", "/example.jsp?date=" + (+new Date), true);

Always use the appropriate HTTP method. Do not use `POST`
to prevent caching. See RFC 2616 [ref 1].

<URL: http://www.mnot.net/cache_docs/#EXPIRES>
<URL: http://www.mnot.net/javascript/xmlhttprequest/cache.html >

References:
-----------

[1] http://www.faqs.org/rfcs/rfc2616.html


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/

--

The sendings of these daily posts are proficiently hosted
by http://www.pair.com.

0 new messages