[wp-trac] [WordPress Trac] #29201: File versioning should not use query strings, but rename the filename to allow caching

WordPress Trac noreply at wordpress.org
Thu Jun 9 03:32:37 UTC 2016


#29201: File versioning should not use query strings, but rename the filename to
allow caching
---------------------------+--------------------------
 Reporter:  benoitchantre  |       Owner:
     Type:  enhancement    |      Status:  reopened
 Priority:  normal         |   Milestone:
Component:  Script Loader  |     Version:  3.9.1
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  performance
---------------------------+--------------------------
Changes (by drzraf):

 * status:  closed => reopened
 * focuses:   => performance
 * resolution:  wontfix =>


Comment:

 Replying to [comment:4 dd32]:

 Could you please justify why query-string where added to assets in the
 first place?
 What issue were they supposed to solve? (browser software? browsing
 context? ...)

 Refreshing downstream proxies is as easy as issuing a "Cache-Control" or
 "Pragma", and the webserver as well as the client:
 If a resource changes, just trigger
 {{{
 wp_remote_get($post_url, [ 'blocking'  => false 'headers'  => array
 ('Cache-Control' => 'no-cache') ]);
 }}}

 But these query-string all over the place just make caching more
 difficult.
 Also note that all assets URL are not issued using WP hookable API, even
 in wp-includes/ wp-admin there are currently more that 40 occurences
 matching
 {{{
 \?(v|ver|rev)=
 }}}

 (Quite an intrusive cache workaround)
 Given how much this (bad practise?) [https://github.com/FortAwesome/Font-
 Awesome/issues/3286 expands], it would be nice that strong argument could
 be given to justify it, or otherwise consider going back the plain simple
 URL and solve hypothetical cache freshness problems using best-practises
 as of 2016.

 thank you

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29201#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list