Cache Static Content - Google Analytics & CDN

How do I fix the cache static content when I am failing for two MaxCDN url’s and Google Analytics?

Enable browser caching of static assets:

FAILED (No max-age or expires) - http://jupiterflhomes.jupiterfloridaho.netdna-cdn.com/wp-content/w3tc/min/b9130f/default.include.1212868601.css
FAILED (No max-age or expires) - http://jupiterflhomes.jupiterfloridaho.netdna-cdn.com/wp-content/w3tc/min/b9130f/default.include.983641556.js
WARNING (24.0 hours) - http://www.google-analytics.com/ga.js

Cache score : 88

WebPageTest: http://www.webpagetest.org/result/100725_1V4Q/1/performance_optimization/

Do any easily fixed items jump out at anyone. My MaxCDN is still not getting recognized by the test? Any input for improvements are appreciated :).

The CDN failures aren’t coming through maxcdn. It looks like they are all in the “uploads” folder. Have you changed the wordpress configuration to use the CDN for the uploads (I have a link to the configuration setup earlier in the thread):

FAILED - http://jupiterflhomes.com/wp-content/themes/thesis_17/lib/images/icon-rss.gif
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/01/header1.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/01/Jupiter-Abacoa-Real-Estate-.jpg
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/01/Latest-From-The-Blog.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/01/Palm-Beach-County-School-Lo.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/01/Preferred-Lender.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/04/Abacoa-Town-Center.jpg
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/04/Tuscany-at-Abacoa-Homes-For-Sale.jpg
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/05/Island-at-Abacoa-Homes-For-Sale.jpg
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/05/Valencia-at-Abacoa-Homes-For-Sale.jpg
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/06/digg.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/06/facebook.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/06/rss.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/06/stumbleupon.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/06/twitter.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/06/youtube.png
FAILED - http://jupiterflhomes.com/wp-content/uploads/2010/07/Jupiter-Abacoa-Homes.jpg
FAILED - http://jupiterflhomes.com/wp-includes/js/thickbox/loadingAnimation.gif

For the caching headers, is there a configuration in W3 Total Cache to set long expires on the combined files? It looks like those two are the combined css and js files from W3 Total Cache. Worst case you can just set a .htaccess rule in that folder to set a long expiration for css and javascript but a config setting would be easier.

I have not changed the WP config, and I am not seeing “(I have a link to the configuration setup earlier in the thread)”…in this thread or are you referring to a different thread?

The only setting in W3TC for expired headers is through a check box that says:

check/uncheck - Set expires header
Set the expires header to encourage browser caching of files.

Lol, sorry - I put it in one of the other threads earlier. Here is the Wordpress config for changing the URL for the upload files: http://www.cyberciti.biz/tips/wordpress-cdn-content-delivery-network-configuration.html (step #4)

For the expires, looks like this guide has some info on page 19: W3 Total Cache Installation and Configuration Guide | PDF | Word Press | Cascading Style Sheets

Specifically, looks like the “Advanced Minify Settings” is the place to configure the expires headers for the combined files.

Thanks,

-Pat

I now have the latest 0.9.1 version of W3 Total Cache…I just figured out the expired header time…it was set at 3600 seconds (1 hour), so I changed the HTML and Combined CSS & JS both to 31536000 seconds (1 year)…does that sound right? Tho other Wordpress config is handled through the CDN section of W3 Total Cache where I set up a cname to my MaxCDN pull zone and put the cname into W3TC…I believe that is what this link is referring to which seems to all be handled by W3TC.

Yep, 1 year should be fine. It looks like w3tc generates unique file names any time it changes so there shouldn’t be anything to worry about there. The initial test results you sent didn’t have any header at all though (not even 1hr) so hopefully the update fixed that.

If it’s a cname for your CDN like http://cdn.jupiterflhomes.com/wp-content/w3tc/min/b9130f/default.include.283648289.js …how do you put an expire on this?

The CDN should pass the original expires through. Try hitting the original file using the non-CDN path and see if it has the expires headers. From their config screen:

How do I change the default cache time?

The default caching time is 1 day (24 hours) for all file types. It will respect the ‘Cache Control’ header from your Origin Server if the ‘Cache Control’ header is present. If you need any further custom edge caching settings, please Contact Us.

Interestingly enough that should override the lack of headers from your origin so it might not hurt to contact them. Worst case they can override what you have set on the origin but it would be best to leave it as a passthrough.

How do I change the expires on a cdn.jupiterflhomes.com file…is this even possible?

Enable browser caching of static assets:

FAILED (No max-age or expires) - http://cdn.jupiterflhomes.com/wp-content/w3tc/min/b9130f/default.include.1268329277.css
FAILED (No max-age or expires) - http://cdn.jupiterflhomes.com/wp-content/w3tc/min/b9130f/default.include.1504470886.js

You should try flushing the CDN cache through their UI and if that doesn’t fix it contact their support. Looking at the request directly to the origin files it looks like they are properly set:

Cache-Control public, must-revalidate, proxy-revalidate, max-age=31528483

But they get lost when it goes through the CDN.