By default WP adds a query string to the end of all assets. This is for cache busting purposes. We haven't been using this correctly.
Basically many proxies will not cache requests that contain query strings. Therefore in order to cache static assets such as CSS and JS which we want to have a far future cache expiry we need to remove the query string.
However we need to retain the cache busting abilities else users will never see the updated asset files when we update.
To do this we need to do the following
Update assets to remvoe query strings. This is achieved by setting null as the argument. See here
By default WP adds a query string to the end of all assets. This is for cache busting purposes. We haven't been using this correctly.
Basically many proxies will not cache requests that contain query strings. Therefore in order to cache static assets such as CSS and JS which we want to have a far future cache expiry we need to remove the query string.
However we need to retain the cache busting abilities else users will never see the updated asset files when we update.
To do this we need to do the following
null
as the argument. See hereversion
as per MXVice. Add to run on watch tasks.