Current time: 08-22-2019, 03:36 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cache Static Content - Google Analytics & CDN
07-26-2010, 04:26 AM (This post was last modified: 07-26-2010 04:30 AM by DJMorrisInc.)
Post: #1
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.n...868601.css
FAILED (No max-age or expires) - http://jupiterflhomes.jupiterfloridaho.n...3641556.js
WARNING (24.0 hours) - http://www.google-analytics.com/ga.js

Cache score : 88

WebPageTest: http://www.webpagetest.org/result/100725...imization/

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 Smile.
Find all posts by this user
Quote this message in a reply
07-26-2010, 09:30 PM
Post: #2
RE: Cache Static Content - Google Analytics & CDN
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/the...on-rss.gif
FAILED - http://jupiterflhomes.com/wp-content/upl...eader1.png
FAILED - http://jupiterflhomes.com/wp-content/upl...state-.jpg
FAILED - http://jupiterflhomes.com/wp-content/upl...e-Blog.png
FAILED - http://jupiterflhomes.com/wp-content/upl...ool-Lo.png
FAILED - http://jupiterflhomes.com/wp-content/upl...Lender.png
FAILED - http://jupiterflhomes.com/wp-content/upl...Center.jpg
FAILED - http://jupiterflhomes.com/wp-content/upl...r-Sale.jpg
FAILED - http://jupiterflhomes.com/wp-content/upl...r-Sale.jpg
FAILED - http://jupiterflhomes.com/wp-content/upl...r-Sale.jpg
FAILED - http://jupiterflhomes.com/wp-content/upl...6/digg.png
FAILED - http://jupiterflhomes.com/wp-content/upl...cebook.png
FAILED - http://jupiterflhomes.com/wp-content/upl...06/rss.png
FAILED - http://jupiterflhomes.com/wp-content/upl...leupon.png
FAILED - http://jupiterflhomes.com/wp-content/upl...witter.png
FAILED - http://jupiterflhomes.com/wp-content/upl...outube.png
FAILED - http://jupiterflhomes.com/wp-content/upl...-Homes.jpg
FAILED - http://jupiterflhomes.com/wp-includes/js...mation.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.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-26-2010, 09:53 PM
Post: #3
RE: Cache Static Content - Google Analytics & CDN
(07-26-2010 09:30 PM)pmeenan Wrote:  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):

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.
Find all posts by this user
Quote this message in a reply
07-27-2010, 03:19 AM
Post: #4
RE: Cache Static Content - Google Analytics & CDN
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-...ation.html (step #4)

For the expires, looks like this guide has some info on page 19: http://www.scribd.com/doc/34170452/W3-To...tion-Guide

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

Thanks,

-Pat
Visit this user's website Find all posts by this user
Quote this message in a reply
07-27-2010, 03:35 AM (This post was last modified: 07-27-2010 03:47 AM by DJMorrisInc.)
Post: #5
RE: Cache Static Content - Google Analytics & CDN
(07-27-2010 03:19 AM)pmeenan Wrote:  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-...ation.html (step #4)

For the expires, looks like this guide has some info on page 19: http://www.scribd.com/doc/34170452/W3-To...tion-Guide

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.
Find all posts by this user
Quote this message in a reply
07-27-2010, 03:44 AM
Post: #6
RE: Cache Static Content - Google Analytics & CDN
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-27-2010, 08:27 AM
Post: #7
RE: Cache Static Content - Google Analytics & CDN
(07-27-2010 03:44 AM)pmeenan Wrote:  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...3648289.js ....how do you put an expire on this?
Find all posts by this user
Quote this message in a reply
07-27-2010, 08:34 AM
Post: #8
RE: Cache Static Content - Google Analytics & CDN
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-27-2010, 11:18 PM
Post: #9
RE: Cache Static Content - Google Analytics & CDN
(07-27-2010 08:34 AM)pmeenan Wrote:  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...329277.css
FAILED (No max-age or expires) - http://cdn.jupiterflhomes.com/wp-content...4470886.js
Find all posts by this user
Quote this message in a reply
07-27-2010, 11:31 PM
Post: #10
RE: Cache Static Content - Google Analytics & CDN
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)