css - Cache breaker as query parameter vs cache breaker in filename -


we have come across 2 ways cache breaking our css files.

cache breaker passed query parameter:

http://your1337site.com/styles/cool.css?v=123 

cache breaker part of name:

http://your1337site.com/styles/123.cool.css 

which way better? , why?

i feel second way more verbose, because file matches name on folder structure. first way if want share "cool.css" on other parts of site, don't have access unique name generate each time.

steve souder's article revving filenames: don’t use querystring makes argument changing filename better of two.

...a co-worker, jacob hoffman-andrews, mentioned squid, popular proxy, doesn’t cache resources querystring. hurts performance when multiple users behind proxy cache request same file – rather using cached version have send request origin server.

as aside, squid 2.7 , above cache dynamic content default configuration


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -