• Hi. Love this plugin.

    When I combine all my CSS/JS, the combined file looks like this:

    http://mysite.com/wp/wp-content/w3tc/min/acf23c57.a71535.css?c6d3c0

    Two questions:

    1. We have our origin pull CDN url mapped to this folder. So

    mysite.com/wp/wp-content/w3t/min -> cdn.mysite.com

    So instead of the url above, we would like minified files to have URLs like this:

    http://cdn.mysite.com/acf23c57.a71535.css?c6d3c0

    How to do this?

    2. How can I get rid of that querystring? I want the minified and combined thing to just be a CSS file. That’s enough.

    Thanks!

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Frederick Townes

    (@fredericktownes)

    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.]

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    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)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: W3 Total Cache] Origin Pull CDN for minified files?’ is closed to new replies.