• Resolved mattwiner

    (@mattwiner)


    I had my CloudFront setup in W3TC to Origin Pull initially. But it wasn’t fast enough. So I changed it over to Origin Push. I have the contents of WP-Content syncd to s3 every 120 seconds.

    So I went back over to the AO settings and changed the CDN base url to the cname of the CDN. After refreshing everything I started getting 403 errors on all my CSS. So obviously those CSS files it’s looking for are missing. Is it because the CDN is still trying to reference old files. Or is it trying to reference files that haven’t gotten there yet? Even after making sure the WP-Content syncd up, the files still didn’t end up there.

    I ended up changing the CDN base URL back to the Pull CDN and I’m temporarily running both until I get this figure out.. (silly I know).

    So I’m not sure which settings I’m missing here.

    The site is https://www.glossyfinish.com

    Thanks

    https://www.ads-software.com/plugins/autoptimize/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Frank Goossens

    (@futtta)

    well, haven’t tested AO with push CDN really … so what does the push-CDN-URL look like in the autoptimized HTML, how is it different from your pull-CDN-URL and from the push-CDN-URL’s as created by W3TC?

    frank

    Thread Starter mattwiner

    (@mattwiner)

    The push url for a css file for example is:
    https://cdn.glossyfinish.com/wp-content/cache/autoptimize/css/autoptimize_f2c5cd3ac490702263942d129d16ee12.css

    The pull url is basically the same thing just with the base as: https://d3jujkn47xr44k.cloudfront.net.

    Plugin Author Frank Goossens

    (@futtta)

    well, the push URL works. is that the URL that AO had in the HTML as well? and what did you enter as CDN URL in AO?

    frank

    Thread Starter mattwiner

    (@mattwiner)

    ok that was a bad example because that CSS file existed.

    But the HTML seems to be generating correctly.
    Here’s what I see in the html:
    https://d329ynpon1fy87.cloudfront.net/wp-content/cache/autoptimize/css/autoptimize_f2c5cd3ac490702263942d129d16ee12.css

    Just so I understand, when the page is requested, AO checks to see if the CSS is cached, if it’s not, then a new file is generated? So there would be a delay in both generating new optimized CSS and JS, and then of course in a push CDN getting the file to the S3 bucket?

    But the push CDN using the s3 bucket is so much faster then a pull from origin CDN.

    Now, if we make an update to a page, the next visitor will automatically regenerate new optimized CSS/JS correct? So the first visitor will have a slower visit.

    It’s weird that some item are pulled from one CDN vs the other.
    https://www.glossyfinish.com/dev/screenshot_sources.png

    Thanks

    Plugin Author Frank Goossens

    (@futtta)

    Just so I understand, when the page is requested, AO checks to see if the CSS is cached, if it’s not, then a new file is generated?

    when the page is requested and is not in the page cache, yes.

    So there would be a delay in both generating new optimized CSS and JS

    yes, that typically does cause some delay (depending on amount of JS/ CSS, if there’s a lot files already minified or not (*min.js or *min.css) and on your CPU power)

    and then of course in a push CDN getting the file to the S3 bucket?

    yep, but that’s something AO does not do off course ??

    Now, if we make an update to a page, the next visitor will automatically regenerate new optimized CSS/JS correct?

    an update to a page will rarely result in CSS or JS changes, so in general the existing optimized CSS/ JS will be re-used.

    It’s weird that some item are pulled from one CDN vs the other.
    https://www.glossyfinish.com/dev/screenshot_sources.png

    well, I guess you have the pull-cdn configured in AO and the push-cdn in WT3C, no?

    frank

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using AO with W3TC and AWS CDN’ is closed to new replies.