Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Busting: Server vs Query String #256

Closed
chuanxshi opened this issue Dec 21, 2010 · 1 comment
Closed

Cache Busting: Server vs Query String #256

chuanxshi opened this issue Dec 21, 2010 · 1 comment

Comments

@chuanxshi
Copy link
Member

According to an article written by Sergey Chernyshev on Performance Calendar, he argued that using query string may not be the best way for cache busting, quote what he said:

The reason for this is that some intermediate proxy and potentially some other clients might not cache assets that have query strings because of some basic heuristics that flag such requests calls for dynamic data.
(http://calendar.perfplanet.com/2010/easy-cache-headers/)

So I am thinking, can we do something like configuring the htaccess file to use server technique to do the cache busting? I know one concern maybe that not everyone knows how to configure server. It will look like something below in the htaccess file:

Cache busting js and css files:

RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L]

ideas or thoughts?

@paulirish
Copy link
Member

The query string is definitely not best. Squid proxy has issues with it.

But I don't want anything in the HTML that absolutely relies on the htaccess working and in place. So for now we go with the less-great query string cachebust.

The build script rectifies all these issues and does this in the optimal way.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants