Make WordPress Core

Opened 8 years ago

Last modified 8 years ago

#40602 new enhancement

Implement immutable cache headers

Reported by: programmin's profile programmin Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Script Loader Keywords: needs-patch
Focuses: performance Cc:

Description

When you have js files that will not change in a certain version of Wordpress, why not set the immutable cache that is enabled on various browsers?

https://hacks.mozilla.org/2017/01/using-immutable-caching-to-speed-up-the-web/

For example this url should never change output unless user changed the wordpress version, in which case the ver= will change, forcing browser to load that url.

/wp-admin/load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,underscore,mediaelement,jquery-ui-sortable&ver=4.7.4

Change History (3)

#1 @dd32
8 years ago

  • Component changed from General to Script Loader
  • Keywords needs-patch added

I have no issue setting this flag, I like the suggestion after reading a little about it.

I think the only scenario we should set it though, is in the case where $_GET['ver'] is present and it does not contain a - character (in the ver param) to avoid caching issues while testing beta's, RC's, and primarily nightlies (where in, the ver may not be unique if operating from the /src directory)

#2 @ocean90
8 years ago

Previously: #28722

#3 @johnbillion
8 years ago

  • Summary changed from Why doesn't Wordpress use Immutable Cache? to Implement immutable cache headers
  • Version trunk deleted
Note: See TracTickets for help on using tickets.