How to solve Google Cache problem?

Asked

Viewed 288 times

0

I took the test on pagespeed and even having installed the plugin of Wordpress appeared this:

Leverage browser caching
Setting an expiry date or a Maximum age in the HTTP headers for Static Resources instructs the browser to load Previously downloaded Resources from local disk rather than over the network.
Leverage browser caching for the following cacheable Resources:

http://maps.googleapis.com/...Libraries=places&language=en&key&ver=1.0 (30 minutes)

http://js-agent.newrelic.com/nr-963.min.js (60 minutes)

http://www.google-analytics.com/analytics.js (2 hours)

1 answer

0


  • If the links are yours then you can try to configure using .htaccess (use apache) as I answered in /a/120344/3635

  • If it’s a github.io page, there’s no way (/a/67190/3635)

  • If they are external links, which you have no control over the servers, like maps.google.com and googleanalitics there is nothing to do

    however if they are images maybe you can use a proxy in a programming language, it will depend on the need to use the image, an example with php: /a/124656/3635

In short, make the best of it, some essential service links will unfortunately not give the 100/100 or 99/100 pagespeed, but it is something superfluous. Focus on reducing requests only on your server and calling third-party Apis only when needed.

For example, I don’t think you’re gonna use google-maps on every page, so just call it <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> on the necessary pages.

  • 1

    OK William I will test, thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.