Remove Query String From Static Resources?
rajivseelam opened this issue · comments
According to this article (and some other resources)
http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
In pipeline function we add query at the end of the path $timestamp = (intval($this->pipeline) > 1) ? '?' . $this->pipeline : null;
If we add $timestamp
just before $extension
this can be easily solved. Let me know what you think, I would be happy to send a pull request.
The timestamp is already added before the extension and taken into account when generating the pipepline filename so using a timestamp does not only changes the query string but also the filename itself.
I'm fully aware of the issues that using query strings for assets may cause. I'm against them but every time I pointed out how evil they are from a sysadmin point of view I got stoned in the forums and flame wars were started. The pipeline timestamp option as a query string was added due to popular demand and apparently there are some people relaying on the way it is now (ehem, CodeIgniter users) .I would like to get rid of it but I don't want to make those people mad so ...
.. what should I do?
This commit has the required changes to get rid of the query string
What if there is a config option.
query_string => true
I am sure that must have crossed your mind. But, I don't see any other way to keep everyone happy.
Right now I wrote a helper method for myself which removes ?xxxx
part from the returned string by Assets::css()
and Assets::js()
So, it's manageable :)
The commit has been merged into develop branch already. If you use that branch feel free to remove the helper