bigspring / monolith

A starter theme for WordPress built with Twitter Bootstrap
MIT License
9 stars 1 forks source link

Fix browser cache issues #352

Closed jrgmartin closed 8 years ago

jrgmartin commented 8 years ago

All JS and CSS assets should be enqueued using the respective Wordpress functions. This allows us to use the 4th parameter available to both functions: version.

By using a version number, it will ensure that all enqueued JS and CSS files have a URL that changes each time the version number is incremented.

We will need a centralised version number to be stored in the theme/inc/config.php file which should be incremented whenever a new realise is done, and this version should be appended to all wp_enqueue_x calls.

Ensure that with the conditional IE.css and js files in the header that we add a separate function for generating the timestamp.