[squid-users] caching js/css references with parameters, possible squid bug
Amos Jeffries
squid3 at treenet.co.nz
Fri Mar 18 08:00:23 UTC 2016
On 18/03/2016 3:46 a.m., Waitman Gobble wrote:
>
> When a script reference on an HTML page includes a parameter, the script
> does not appear to be cached when using squid in accel mode (https).
>
> For example,
> <script type='text/javascript'
> src='/wp-includes/js/jquery/jquery.js?ver=1.1.13'></script>
>
> jquery.js does not appear to be cached in that case, each page request
> hits the originserver with a request for jquery.js. (also seems browser
> does not cache, either).
How are you determining that?
Dynamic content (as signalled by the '?query-string') is expected to
revalidate on each use unless that origin has sent explicit cacheability
headers. In HTTP/1.1 contact with the origin server is not always a full
fetch.
>
> Removing parameters from html allows the scripts to be cached, but I'm
> wondering if there is a configuration to cache the scripts even with
> parameter spec? In this case it's only a couple of minor modifications
> to wp source, but it would be more convenient to avoid mod altogether.
>
> Also, I noticed that when requesting content through squid in proxy mode
> (not accel), with SSL request - a newline (\r\n) is appearing in the
> header *before* the status, ie HTTP/1.1 200 OK. This does not happen
> with http/80 requests. I haven't tested this thoroughly to be certain
> that it's a problem in squid, but maybe you have an idea if it's
> happening in the code? Something to consider. (Note: It could also be a
> problem with libcurl, if squid is not the culprit).
Thats odd. Can you grab a packet trace between the two to figure that out?
>
> version info:
>
>
> Squid Cache: Version 3.5.15-20160302-r14000
> Service Name: squid
> configure options: '--prefix=/usr/local/squid' '--with-openssl=/usr'
> --enable-ltdl-convenience
>
> FreeBSD 10.2-RELEASE-p9 FreeBSD 10.2-RELEASE-p9 #0:
>
> Thanks,
>
>
More information about the squid-users
mailing list