Mobile app version of vmapp.org
Login or Join
Jamie184

: 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

@Jamie184

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.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Jamie184

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme