[thelist] A question on proxy caching.

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Sun May 8 16:44:56 CDT 2005


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