[squid-users] caching js/css references with parameters, possible squid bug

Waitman Gobble waitman at waitman.net
Thu Mar 17 14:46:24 UTC 2016


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).

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).

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,


-- 
Waitman Gobble
Los Altos, CA
+1 650 900 8557


More information about the squid-users mailing list