I observed the inside the wp_head
function in the source links of every .css
, .js
files a ?ver=1
(or other number based on the file’s/library version) is added. How can I overwrite them, to remove them?
This issue I think is causing problems on the cache manifest part.
You can hook into
style_loader_src
andscript_loader_src
and runremove_query_arg( 'ver', $url )
on the URL:Without this plugin:
After plugin activation:
There is one case where that will fail: When someone didnât use the script/style API, but added a hard coded string to the header.
This worked for me when I still had to load a stylesheet from Google Fonts.