How can I add expire headers for scripts that are not on my server?
header, http, http-headers
Solution
You can only add header fields in responses to requests that go to your own server. If the request goes to another server, say Google’s server, than it’s Google’s server that answers the request.
So the only solution to your problem is hosting that external resources on your own server. But that’s only possible if that resources are static, do not change from request to request and do not depend on other things.
Problem
I have a website and I added the expire headers on all pages/images and scripts but I don’t know how I could add expire headers to external scripts. For example Google Analytics - it has expire headers set to 1 day. Google is not my problem, some other scripts from external websites are the real problem, they don't have expire headers at all.