Skip to main content
Topic: How To Add Expires Headers To External Images (Read 2275 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How To Add Expires Headers To External Images

As the title says, how do we add expires headers to external images like my gravatar in here?

Re: How To Add Expires Headers To External Images

Reply #1

You cannot.
It's the server that sets the expiry date, unless you control the server you can't do much about it.
Bugs creator.
Features destroyer.
Template killer.

Re: How To Add Expires Headers To External Images

Reply #2

Thank you. So roughly I understand that we should rather cache the external image to add "expires headers" via our own server settings.

Do we have addons to cache external images? Will your Image Caching addon or @tino's External Image Proxy for http images or @Spuds' Image Cache work for this purpose, you think?
Last Edit: March 05, 2019, 07:07:06 pm by ahrasis

Re: How To Add Expires Headers To External Images

Reply #3

But out of curiosity, why would you want to add an expire header to external images?
Bugs creator.
Features destroyer.
Template killer.


Re: How To Add Expires Headers To External Images

Reply #5

Shouldn't expires headers be our good practise, even on the external images or other external files?

But I get it that we cannot add it to the external files since we are not in control of their servers, except by caching them locally.

So, can any of the mentioned addons actually cache them?

Re: How To Add Expires Headers To External Images

Reply #6

It may be, but honestly control the web is just a waste of time and resources to me. :P

External images are cached because of the http/https thingy, not sure though if all images are cached or only the http ones.
Bugs creator.
Features destroyer.
Template killer.

Re: How To Add Expires Headers To External Images

Reply #7

My mod won’t mess with the expires headers. It just passes the image through to the other application. If you use the nginx option you can modify the headers or use your own custom camo or weserv server aswell actually.
Last Edit: March 09, 2019, 02:07:27 am by tino