[thelist] Avoiding Downstream Caching from AJAX Request

Volkan Özçelik volkan.ozcelik at gmail.com
Mon Feb 18 10:56:40 CST 2008

Hi Chris,

>Am I correct in saying that including the following HTTP request header
>will ensure that downstream caching is *not* performed for this

Well I'm not sure about IE.

When your web page uses JavaScript to update the content of a markup
Internet Explorer looks at the web address of that remote procedure call
very closely.
If the address exactly matches an address that has been previously "RPCed",
it will return the cached copy of that request from the browser
(rather than downloading a fresh copy from the web server).

As a developer of an AJAX library (sardalya) I've examined several libraries
(YUI, prototype, DOJO, ext.js and the like)
before  (and I still compare and contrast them regularly)

All of these libraries overcome caching issue by appending  a  parameter of
some sort to the  request URI.

In sardalya it is done by parsing each AJAX request.

Here is the a related snippet from sardalya:

    var len=this._fields.length,i=0,append="";


    return {url:(strURL+"?rnd="+Math.random()),query:append.substring(1)};

Hope that helps,
Volkan Ozcelik
+> linkibol.com - in seek for quality links : http://www.linkibol.com/
+> Going solo in Turkish: http://www.fikribol.com/donkisot/
+> My projects/studies/trials/errors : http://www.sarmal.com/
+> Sardalya JavaScript Library: http://www.sarmal.com/sardalya/

More information about the thelist mailing list