1. Have you enabled CDN in your account and checked off the option so that minified files are addressed?
2. If you do not use the query string and you change your browser cache settings or change the contents of the file, there’s no guarantee that visitors will download the latest version of the file. Are you sure you don’t care about these cases?
Thread Starter
pkiula
(@pkiula)
Frederick, thanks for replying.
1. Yes. And I think the CDN *only* replaces the domain name. I want it to replace a path longer than that, but there’s no mechanism to specify exactly what to replace with what. I tried the plugin WP-Regexp, which works in general, but W3 totally ignores it. And I need W3 more, for the caching.
Basically I do NOT want “mysite.com” to be replaced by “cache.mysite.com”.
Instead, I want:
a. “mysite.com/wp/wp-includes/
” -> “cache.mysite.com
“
b. mysite.com/wp/wp-content/w3tc/min
” -> “cache2.mysite.com
“
Hope this makes sense. Please let me know how to enable these very specific replacements.
2. My expectation is to have the minified file name different after each version. No need for query string. If a browser is force-caching a version of the page on the user’s end, it’ll also ignore the query string. If a browser pulls a fresh version from the server, then it’ll see the name of the minified CSS file as a new file too: aabbc1.css
, as opposed to aabbc2.css
. The name of the file itself will be different. Isn’t that how caching plugins work?
Much appreciate your thoughts.
[No bumping, thank you.]
We dont generate query strings for our minify files by default, but you’ve chosen “Prevent caching of objects after settings change” option on the Browser Cache settings tab causes that. By unchecking it your files won’t contain query string anymore, but your users will probably have old versions of js/css files even when you update your files.
About paths, well we can make some enhancement, like “path mapping”, so that we will store all local files from /a/b/c to CDN’s /xxx right now I have no plans to support it, in theory that can make page smaller for a couple of bytes, but it’s complex and slow operation to run.
Can you please help me understand why you want to take this approach (from a benefits standpoint)?