[wp-trac] [WordPress Trac] #29201: Ehancement: file versioning should not use query strings, but rename the filename to allow caching
WordPress Trac
noreply at wordpress.org
Wed Aug 13 11:36:38 UTC 2014
#29201: Ehancement: file versioning should not use query strings, but rename the
filename to allow caching
---------------------------+------------------------------
Reporter: benoitchantre | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version: 3.9.1
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Changes (by SergeyBiryukov):
* component: General => Script Loader
Old description:
> Most proxies, most notably Squid up through version 3.0, do not cache
> resources with a "?" in their URL even if a Cache-control: public header
> is present in the response. To enable proxy caching for these resources,
> remove query strings from references to static resources, and instead
> encode the parameters into the file names themselves.
> http://gtmetrix.com/remove-query-strings-from-static-resources.html
>
> wp_enqueue_style and wp_enqueue_script have a parameter $ver to specify a
> version number, but it adds a query string in the returned link.
>
> It would be better to rename the filename
> style.foo.css instead of style.css?v=foo
>
> Another detailed info about that: (this link can be found in the htaccess
> file of html5boilerplate):
> http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-
> querystring/
New description:
Most proxies, most notably Squid up through version 3.0, do not cache
resources with a "?" in their URL even if a Cache-control: public header
is present in the response. To enable proxy caching for these resources,
remove query strings from references to static resources, and instead
encode the parameters into the file names themselves.
http://gtmetrix.com/remove-query-strings-from-static-resources.html
wp_enqueue_style and wp_enqueue_script have a parameter $ver to specify a
version number, but it adds a query string in the returned link.
It would be better to rename the filename
style.foo.css instead of style.css?v=foo
Another detailed info about that: (this link can be found in the htaccess
file of html5boilerplate):
http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-
querystring/
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29201#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list