[thelist] A question on proxy caching.

Ken Schaefer Ken at adOpenStatic.com
Mon May 9 00:56:06 CDT 2005

Without knowing the actual proxy server in use, and how it's configured, it's
impossible to say with any certainty how it will behave with your proposed

That said, what you are proposing generally works. You just need to ensure
that the element generated is actually random (or at least changes between
requests). If the code that generates the suffix is client-based and is
cached by the proxy server, then you need to make sure that it's still
capable of generating different values each time it's loaded by the browser.



: From: thelist-bounces at lists.evolt.org [mailto:thelist-
: bounces at lists.evolt.org] On Behalf Of VOLKAN ÖZÇELIK
: Subject: [thelist] A question on proxy caching.
: Hi evolters!
: We're developing a site and some of our clients (ADSL users actually)
: showed that their js files are being cached. When we make a change it
: might take around 1 day for the changes to propagate to the client.
: We've tried the usual tricks ctrl+R, ctrl+f5, type the url of the js
: file to the address bar and then ctrl+f5, adding pragma no cache and
: several other browser specific "please don't cache me, I beg on my
: knees" headers.
: None of them worked :(
: My intelligent guess is that not the client's browser but TurkTelecom
: (the ADSL provider) is caching the files to reduce network traffic.
: After this much introduction, here is my question?
: say my js file is included like
: <script type="text/javascript" src="pathtomyfile/myfile.js"></script>
: Can appending a random generated query string will deceive the ISP and
: prevent the file from being cached? I mean:
: <script type="text/javascript"
: src="pathtomyfile/myfile.js?rand=1231.2323xys"></script>
: given that rand changes at each request, will the proxy server send
: the fresh file, instead of providing the cached one.
: Or can the ISP proxy be"clever-enough" to detect that the two HTTP
: requests  (with and without the appended query string) refer to the
: same file and provide the cached version of the file in either
: situation?
: This cache issue is causing a lot of headache, and when the usage of
: the system spreads more, things will be much worse. We are updating
: the system/scripts etc approximately thrice a week. So caching is an
: important issue.
: I hear you saying "don't bother us, just try and see". But it is at
: least 1-day work. (not all the files cached, and it appears that the
: files are cached at random, so it will be a project-wide
: implementation) So if it will definetely not work, I'd be glad to
: learn before I begin. Similarly if it will definetely solve the
: problem, I will be rushing to implement it.
: Thank you very much in advance,
: Volkan.

More information about the thelist mailing list