How to control cache of some js files ?

SniperCode Sheva
SniperCode Sheva used Ask the Experts™
on
Hello, when I test the performances of my website I am having some errors like this :
cache.PNGWhat should I do ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017
Commented:
None of those are yours so it is not clear what tests you are running and what you hope to accomplish.
The presumption by the analysis is that you have authorship rights of those ,js file, I believe all those .js file have a no-cache directive.
Hi

arnold is right - you do not have any control over these files, in fact they already come with their own cache control directives so a browser does cache them for the time specified in the report.
This file https://connect.facebook.com/fr_FR/fbds.js is already cached for 1200 seconds, like the report states. Maybe this report means that cache ttl can be longer, but it is out of your control anyway.

However, you can improve performance by using https in all references to these objects.  
http://connect.facebook.com/fr_FR/fbds.js  responds in a redirect to the same object but via a secure protocol, and using https upfront will improve the cumulative page load time by up to a second in some locations.
Top Expert 2015

Commented:
You cannot control external resources. Facebook and Google are always fast to load.
Is the picture from gtmetrix.com ?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Yes.
Top Expert 2015
Commented:
OK, my OCR works well. You cannot control external resources at all, what you see is that your page resources are configured well. Those are tracking scripts and sites providing them use those short expiry times. You cannot change that at all.

Author

Commented:
Ah, thank you.
Is GtMetrix the best way to know the performance of a website or do you have another website which can help me more ?
Top Expert 2015

Commented:
It points configuration issues just fine in easy to assess form. It is free compared to holding a machine across one ocean to meter user experience for one single site.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial