html - CSS cache update and CDNs -


when develop web applications, i'm used add ?ver=xxx @ end of css uris.

i'm updating wordpress theme , found filter removes ?ver= "static ressources" :

     add_filter( 'script_loader_src', 'mb_remove_script_version', 15, 1 );     add_filter( 'style_loader_src', 'mb_remove_script_version', 15, 1 ); 

searching web found without removing thoses ver=, cdn may not work , not cache css files ! that's big surprise me used everywhere.

i use version force browsers update cache when modify css (by versionning up). how force browser understand file must downloaded again without using ver= ?

 --  thank  nicolas. 

you can use tool such grunt (or gulp) rev assets:
https://www.npmjs.com/package/grunt-wp-assets
https://www.npmjs.com/package/gulp-rev


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -