: As Robert mentioned in comments, you can't add any additional headers (Expires, Cache-Control, etc.) to any resources (JS, CSS, images, etc.) that are hosted and served by a third party, unless
As Robert mentioned in comments, you can't add any additional headers (Expires, Cache-Control, etc.) to any resources (JS, CSS, images, etc.) that are hosted and served by a third party, unless you have direct control of that third party in order to do so. Perhaps if the third party offers this as a feature.
You can only add additional HTTP response headers to resources that you are directly serving from your site.
However, there is a "theoretical workaround". You can potentially configure part of your site as a proxy (or temporary store for these external resources). For example, the links to these third party files are changed to point to your site. Your server then makes a "proxy" request to the third party resource which is sent back to your server and your server then sends this back to the client, with any additional HTTP response headers (eg. Expires) you might want to set. However, this is non-trivial, a potential security hole if done incorrectly and may not be possible anyway if the entire tool is hosted externally, as is the case with Disqus.
More posts by @Jamie184
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.