Forum Topic: browser caching URL

Forum: .htaccess Forum : General • Posted by David • Updated:

test site with browser caching from the htaccess made easy book:

www.take100.yourweblab.nl

Hi Jeff,

When I use “Google Page Speed” on my test site I get a warning that I have to browser cache:

http://maps.google.com/maps/api/js?sensor=false (30 minutes)

and

http://platform.twitter.com/widgets.js?_=1417768457708 (30 minutes)

Is this possible? And how do I achieve that?

Thanks!

David

3 Replies to “browser caching URL”

Posted by Jeff Starr

Hi David,

I wish I had a solution for this one, but the .htaccess on the parent site doesn’t, or can’t, do much of anything to pages and scripts loaded in iframes. It’s up to the site that is serving those pages (e.g., google.com and twitter.com in this case). Sort of just one of those things.

Posted by David •

Thanks Jeff!

Yes it’s sad to see Google using code that is not encoded, but doesn’t work when you encode the URL so it’s impossible to cache.

And at the same time they warn me that it’s not cached in “Page Speed”.

Regards,

David

Posted by Jeff Starr

Totally agree! It is very frustrating spending so much time hand-crafting a well optimized site, and then having to make compromises just to include social media stuff.

In any case, I wish you the best success with your project.