• LuisDaniel

    (@luisdaniel)


    Hi,
    I’m using W3TC from some time ago and it worked well in combination with Amazon Cloudfront. But some weeks ago people noticed failures in the page.

    After some tests, I noticed the situation happens when using JSS minification and CDN. I deactivated JSS minification but if I turn on CDN (clearing caches of course), the page request some .js.gzip files from the thema, for example:

    GET https://cdn2.elece.net/blog/wp-content/themes/Divi/js/custom.js.gzip net::ERR_ABORTED 404

    The *.js.gzip files doesn’t exist in the CDN or my server directory. I tried to manually compress the files (gzip and deflate are active in Apache) but it leads to another error:

    Uncaught SyntaxError: Invalid or unexpected token

    (also, the JS minification and HTML compression is deactivated)
    The only way the page displays zero errors is deactivating CDN.
    Is possible to tell CDN not to load the .gzip files? Is this configuration saved anywhere and not cleared when flushing caches?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • bgdstr

    (@bogdanstratulat)

    what is the W3TC that you are using? Can you please make sure that the plugin is fully updated? If the issue persists, please feel free to update this topic .

    Thread Starter LuisDaniel

    (@luisdaniel)

    Hello bogdan! It’s the 0.9.7 version. I do not know when started to happen this, my first thought was a problem in the side of CloudFront but then I noticed the files that are supposed to mirror didn’t exist in my server at all. The thing is, when CDN is checked the page try to open these files even deactivating the minification/compressing options.

    I’m going now to deinstall/reinstall W3TC and reconfigure to see what happens. Will update soon…

    I have the same issue. I am new to setting up W3TC and Cloudfront/S3. I have minify turned off, however.

    0.9.7.2

    Failed to load resource: the server responded with a status of 403 (Forbidden)

    https://***.cloudfront.net/wp-content/themes/bb-theme/js/jquery.throttle.min.js.gzip?ver=1.7.1.3

    The file doesn’t get uploaded to S3 through W3TC UI, and I am not sure how to get it to upload.

    • This reply was modified 6 years, 8 months ago by breeakpoint.

    If I trun off Gzip under Browser Cache settings and add the css and js files to the Custom files list it seems to work. But this is a lot of effort to mention all the different places for files to be uploaded from.

    And I imagine W3TC should not clash with the Browser Cache and CDN settings

    • This reply was modified 6 years, 8 months ago by breeakpoint.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘CDN and compressed .js files not found’ is closed to new replies.