<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Ajax IE Caching Issue</title>
	<atom:link href="http://ajaxian.com/archives/ajax-ie-caching-issue/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/ajax-ie-caching-issue</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: larsguitars</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-285312</link>
		<dc:creator>larsguitars</dc:creator>
		<pubDate>Wed, 06 Oct 2010 06:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-285312</guid>
		<description>Just wrote a blog on this exact issue only using ExtJS ( http://thecodeabode.blogspot.com/2010/10/cache-busting-ajax-requests-in-ie.html)

The problem was as I was using a specific url rewriting format I couldn&#039;t use conventional query string params (?param=value), so I had write the cache busting parameter as a posted variable instead..... I would have thought that using POST variables are a bit safer that GET, simply because a lot of MVC frameworks use the pattern 

protocol://host/controller/action/param1/param2

and so the mapping of variable name to value is lost, and params are simply stacked... so when using a GET cache buster parameter

i.e. protocol://host/controller/action/param1/param2/no_cache122300201

no_cache122300201 can be mistaken for a $param3 parameter which could have a default value

i.e. 

public function action($param1, $param2, $param3 = &quot;default value&quot;)
{
//..//
}

no chance of that happening with POSTED cache busters</description>
		<content:encoded><![CDATA[<p>Just wrote a blog on this exact issue only using ExtJS ( <a href="http://thecodeabode.blogspot.com/2010/10/cache-busting-ajax-requests-in-ie.html" rel="nofollow">http://thecodeabode.blogspot.com/2010/10/cache-busting-ajax-requests-in-ie.html</a>)</p>
<p>The problem was as I was using a specific url rewriting format I couldn&#8217;t use conventional query string params (?param=value), so I had write the cache busting parameter as a posted variable instead&#8230;.. I would have thought that using POST variables are a bit safer that GET, simply because a lot of MVC frameworks use the pattern </p>
<p>protocol://host/controller/action/param1/param2</p>
<p>and so the mapping of variable name to value is lost, and params are simply stacked&#8230; so when using a GET cache buster parameter</p>
<p>i.e. protocol://host/controller/action/param1/param2/no_cache122300201</p>
<p>no_cache122300201 can be mistaken for a $param3 parameter which could have a default value</p>
<p>i.e. </p>
<p>public function action($param1, $param2, $param3 = &#8220;default value&#8221;)<br />
{<br />
//..//<br />
}</p>
<p>no chance of that happening with POSTED cache busters</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shimul39</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-261575</link>
		<dc:creator>shimul39</dc:creator>
		<pubDate>Sun, 24 Feb 2008 21:43:38 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-261575</guid>
		<description>Yes if you use prototype then Medland&#039;s solution would be nice. 

But i solved my problem by putting this 2 lines before the send method.

here is my sample code: 

myReq.open(&quot;GET&quot;, url, true);
myReq.setRequestHeader(&quot;If-Modified-Since&quot;, &quot;Thu, 1 Jan 1970 00:00:00 GMT&quot;);
myReq.setRequestHeader(&quot;Cache-Control&quot;, &quot;no-cache&quot;);

It Rocks!!!!!</description>
		<content:encoded><![CDATA[<p>Yes if you use prototype then Medland&#8217;s solution would be nice. </p>
<p>But i solved my problem by putting this 2 lines before the send method.</p>
<p>here is my sample code: </p>
<p>myReq.open(&#8220;GET&#8221;, url, true);<br />
myReq.setRequestHeader(&#8220;If-Modified-Since&#8221;, &#8220;Thu, 1 Jan 1970 00:00:00 GMT&#8221;);<br />
myReq.setRequestHeader(&#8220;Cache-Control&#8221;, &#8220;no-cache&#8221;);</p>
<p>It Rocks!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lirezh</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-256970</link>
		<dc:creator>Lirezh</dc:creator>
		<pubDate>Thu, 11 Oct 2007 16:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-256970</guid>
		<description>This is so retarded!
firefox does not handle it stupid like that.
It is more than obvious that any ajax call is not to be taken from a cache!

I&#039;m glad i found this blog... solved it by adding the current unixtime as GET parameter *sigh*</description>
		<content:encoded><![CDATA[<p>This is so retarded!<br />
firefox does not handle it stupid like that.<br />
It is more than obvious that any ajax call is not to be taken from a cache!</p>
<p>I&#8217;m glad i found this blog&#8230; solved it by adding the current unixtime as GET parameter *sigh*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ujr</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-256204</link>
		<dc:creator>ujr</dc:creator>
		<pubDate>Fri, 28 Sep 2007 17:57:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-256204</guid>
		<description>You may want to note that in prototype.js 1.6 you need to change

  setRequestHeaders: function() {
    var headers = {
      &#039;X-Requested-With&#039;: &#039;XMLHttpRequest&#039;,
      &#039;X-Prototype-Version&#039;: Prototype.Version,
      &#039;Accept&#039;: &#039;text/javascript, text/html, application/xml, text/xml, */*&#039;
    };

to:

  setRequestHeaders: function() {
    var headers = {
      &lt;b&gt;&#039;If-Modified-Since&#039;: &#039;Thu, 1 Jan 1970 00:00:00 GMT&#039;,&lt;/b&gt;
      &#039;X-Requested-With&#039;: &#039;XMLHttpRequest&#039;,
      &#039;X-Prototype-Version&#039;: Prototype.Version,
      &#039;Accept&#039;: &#039;text/javascript, text/html, application/xml, text/xml, */*&#039;
    };</description>
		<content:encoded><![CDATA[<p>You may want to note that in prototype.js 1.6 you need to change</p>
<p>  setRequestHeaders: function() {<br />
    var headers = {<br />
      &#8216;X-Requested-With&#8217;: &#8216;XMLHttpRequest&#8217;,<br />
      &#8216;X-Prototype-Version&#8217;: Prototype.Version,<br />
      &#8216;Accept&#8217;: &#8216;text/javascript, text/html, application/xml, text/xml, */*&#8217;<br />
    };</p>
<p>to:</p>
<p>  setRequestHeaders: function() {<br />
    var headers = {<br />
      <b>&#8216;If-Modified-Since&#8217;: &#8216;Thu, 1 Jan 1970 00:00:00 GMT&#8217;,</b><br />
      &#8216;X-Requested-With&#8217;: &#8216;XMLHttpRequest&#8217;,<br />
      &#8216;X-Prototype-Version&#8217;: Prototype.Version,<br />
      &#8216;Accept&#8217;: &#8216;text/javascript, text/html, application/xml, text/xml, */*&#8217;<br />
    };</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Medland</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-255398</link>
		<dc:creator>Jason Medland</dc:creator>
		<pubDate>Wed, 12 Sep 2007 15:56:58 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-255398</guid>
		<description>I&#039;ve done all my ajax requests with prototype, which uses the JSONRPC spec (orignal ver), if you set the id parameter of the request to a random value (I stripped the preceeding &quot;0.&quot;) you should have a unique request URI in the GET scope (didn&#039;t want to change my backend for this suite which was already scoped to GET).</description>
		<content:encoded><![CDATA[<p>I&#8217;ve done all my ajax requests with prototype, which uses the JSONRPC spec (orignal ver), if you set the id parameter of the request to a random value (I stripped the preceeding &#8220;0.&#8221;) you should have a unique request URI in the GET scope (didn&#8217;t want to change my backend for this suite which was already scoped to GET).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Esteban</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-253929</link>
		<dc:creator>Esteban</dc:creator>
		<pubDate>Wed, 15 Aug 2007 14:44:22 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-253929</guid>
		<description>ALELUYA !. Somebody figured out, thanks.</description>
		<content:encoded><![CDATA[<p>ALELUYA !. Somebody figured out, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajeev Khandelwal</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-253744</link>
		<dc:creator>Rajeev Khandelwal</dc:creator>
		<pubDate>Fri, 10 Aug 2007 13:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-253744</guid>
		<description>thanks  for suggestion it really works for me , after going through  many problems.</description>
		<content:encoded><![CDATA[<p>thanks  for suggestion it really works for me , after going through  many problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bravo</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-247958</link>
		<dc:creator>Bravo</dc:creator>
		<pubDate>Fri, 09 Mar 2007 20:41:56 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-247958</guid>
		<description>Thanks.. the POST method saved me.. (sigh IE is a pain in ass) For some what reason I started debuging using Metatags, and adding &amp;random but didnot work for me.</description>
		<content:encoded><![CDATA[<p>Thanks.. the POST method saved me.. (sigh IE is a pain in ass) For some what reason I started debuging using Metatags, and adding &amp;random but didnot work for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morque Alain</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-185927</link>
		<dc:creator>Morque Alain</dc:creator>
		<pubDate>Wed, 15 Nov 2006 21:41:04 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-185927</guid>
		<description>Hi,
using Sajax, i have experienced the same caching problem. trying to retrieve a list oj JSON objects from server which changes time to time.
I ve solved the problem with expires http header parameter: e.g in CGI perl:
print $cgi-&gt;header(-expires=&#039;-1d&#039;); # already expired !!</description>
		<content:encoded><![CDATA[<p>Hi,<br />
using Sajax, i have experienced the same caching problem. trying to retrieve a list oj JSON objects from server which changes time to time.<br />
I ve solved the problem with expires http header parameter: e.g in CGI perl:<br />
print $cgi-&gt;header(-expires=&#8217;-1d&#8217;); # already expired !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Himani</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-169994</link>
		<dc:creator>Himani</dc:creator>
		<pubDate>Wed, 08 Nov 2006 06:31:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-169994</guid>
		<description>HI
I am using Ajax.I have added some data to Cache usind Add Method.But when I use Ajax I can not use Cache.How to do it?
I am using System.web.Caching.</description>
		<content:encoded><![CDATA[<p>HI<br />
I am using Ajax.I have added some data to Cache usind Add Method.But when I use Ajax I can not use Cache.How to do it?<br />
I am using System.web.Caching.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bazzz</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-141781</link>
		<dc:creator>Bazzz</dc:creator>
		<pubDate>Sun, 22 Oct 2006 10:02:39 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-141781</guid>
		<description>Ahhhhh, thx man, I had a similar problem and thanks to this article I found the solution. :D</description>
		<content:encoded><![CDATA[<p>Ahhhhh, thx man, I had a similar problem and thanks to this article I found the solution. :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Pedersen</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-94350</link>
		<dc:creator>Aaron Pedersen</dc:creator>
		<pubDate>Sat, 16 Sep 2006 00:38:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-94350</guid>
		<description>I&#039;ve ran into this problem many times. For my current client we are using Ajax.Updater() from  prototype.js and we&#039;re pulling plain .html content.  My first attempt to fix IE caching was to use POST, but as some of you already know, with Apache you cant use a POST to request an html page.   

There for our solution was to add &#039;?random=&#039; + Math.random(); to the end of all our requests. Its nasty looking but it solves the issue.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve ran into this problem many times. For my current client we are using Ajax.Updater() from  prototype.js and we&#8217;re pulling plain .html content.  My first attempt to fix IE caching was to use POST, but as some of you already know, with Apache you cant use a POST to request an html page.   </p>
<p>There for our solution was to add &#8216;?random=&#8217; + Math.random(); to the end of all our requests. Its nasty looking but it solves the issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Pascarello</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-94053</link>
		<dc:creator>Eric Pascarello</dc:creator>
		<pubDate>Fri, 15 Sep 2006 19:33:32 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-94053</guid>
		<description>Oliver wrote: And the second issue is that GET is not working for large amout of data.

Because there is a limit with how long a URL can be. Nothing new...

Eric</description>
		<content:encoded><![CDATA[<p>Oliver wrote: And the second issue is that GET is not working for large amout of data.</p>
<p>Because there is a limit with how long a URL can be. Nothing new&#8230;</p>
<p>Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-93818</link>
		<dc:creator>Oliver</dc:creator>
		<pubDate>Fri, 15 Sep 2006 15:32:13 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-93818</guid>
		<description>The workaround with the seconds is not working on a lot of proxy servers. To be more sure there is nobody caching the request use POST. As I can imaging Ajax.NET is doing this from the beginning. And the second issue is that GET is not working for large amout of data.</description>
		<content:encoded><![CDATA[<p>The workaround with the seconds is not working on a lot of proxy servers. To be more sure there is nobody caching the request use POST. As I can imaging Ajax.NET is doing this from the beginning. And the second issue is that GET is not working for large amout of data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hulkster</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-92796</link>
		<dc:creator>Hulkster</dc:creator>
		<pubDate>Thu, 14 Sep 2006 18:30:36 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-92796</guid>
		<description>&lt;strong&gt;New ones (Web, Code stuff) &lt;/strong&gt;

Web stuff Web Development Tools for the Power Developer Ajax IE Caching Issue and Dramatically improved</description>
		<content:encoded><![CDATA[<p><strong>New ones (Web, Code stuff) </strong></p>
<p>Web stuff Web Development Tools for the Power Developer Ajax IE Caching Issue and Dramatically improved</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RIM</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-92312</link>
		<dc:creator>RIM</dc:creator>
		<pubDate>Thu, 14 Sep 2006 09:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-92312</guid>
		<description>I&#039;ve never had a problem with setting the &lt;code&gt;If-Modified-Since&lt;/code&gt; header.
Blog &lt;a href=&quot;http://www.moedata.biz/blog/2006/09/avoiding-ajax-ie-caching-with.html&quot; rel=&quot;nofollow&quot;&gt;post&lt;/a&gt; about how to do this in Protoype.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve never had a problem with setting the <code>If-Modified-Since</code> header.<br />
Blog <a href="http://www.moedata.biz/blog/2006/09/avoiding-ajax-ie-caching-with.html" rel="nofollow">post</a> about how to do this in Protoype.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paschal</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-92166</link>
		<dc:creator>Paschal</dc:creator>
		<pubDate>Thu, 14 Sep 2006 04:25:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-92166</guid>
		<description>Hey I posted about that a while ago (I think last June), easy just add a dummy date to your Ajax requests!

Check my blog here for the details. Work like a charm for me :-)

http://weblogs.asp.net/pleloup/archive/2006/06/08/451583.aspx</description>
		<content:encoded><![CDATA[<p>Hey I posted about that a while ago (I think last June), easy just add a dummy date to your Ajax requests!</p>
<p>Check my blog here for the details. Work like a charm for me :-)</p>
<p><a href="http://weblogs.asp.net/pleloup/archive/2006/06/08/451583.aspx" rel="nofollow">http://weblogs.asp.net/pleloup/archive/2006/06/08/451583.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Leonard</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-91941</link>
		<dc:creator>Tim Leonard</dc:creator>
		<pubDate>Wed, 13 Sep 2006 20:53:23 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-91941</guid>
		<description>I used exactly the same technique as above, just posting either the date and time or a random number in the querystring to force IE to reload the relevant document.

Getting around caches in pretty much all browsers is achieved by doing this.</description>
		<content:encoded><![CDATA[<p>I used exactly the same technique as above, just posting either the date and time or a random number in the querystring to force IE to reload the relevant document.</p>
<p>Getting around caches in pretty much all browsers is achieved by doing this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Sanheim</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-91731</link>
		<dc:creator>Rob Sanheim</dc:creator>
		<pubDate>Wed, 13 Sep 2006 18:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-91731</guid>
		<description>Rob: I&#039;m guessing a lot of regulars do, but there are people learning ajax all the time who get caught by this.</description>
		<content:encoded><![CDATA[<p>Rob: I&#8217;m guessing a lot of regulars do, but there are people learning ajax all the time who get caught by this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://ajaxian.com/archives/ajax-ie-caching-issue/comment-page-1#comment-91714</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Wed, 13 Sep 2006 18:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/ajax-ie-caching-issue#comment-91714</guid>
		<description>I *heart* prototype.js (to each their own I guess)</description>
		<content:encoded><![CDATA[<p>I *heart* prototype.js (to each their own I guess)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

