How to fix F grade for YSlow with 3rd party JavaScripts?

298 Views Asked by At

I get the following F grade:

Grade F on Add Expires headers There are 6 static components without a far-future expiration date. (2016/10/13) https://cjs.ptengine.com/pta_en.js (2016/10/14) https://cjs.ptengine.com/3a2dc781.js (2016/10/14) https://apis.google.com/js/client:platform.js?... (2016/10/14) https://www.google-analytics.com/analytics.js (2016/10/14) https://connect.facebook.net/en_US/sdk.js (no expires) https://preprod.be-novative.com/feed/

Is there a recommended way in 2016 to improve these?

1

There are 1 best solutions below

0
Istvan On

One of the better ways of solving this is to download the JS file to a location that can set cache headers (for example Cache-Control: max-age=2419200). This must be updated regularly.