On 02/03/2021 19.51, Lars Vogdt wrote:
* to amuse myself, I have added some caching (Expires: header) on forum.o.o, to see if caching the most requested static objects would reduce the traffic. Sofar not much effect, not sure why. Did you add it on the server itself or also on the haproxy side? I'm not 100% sure, but IMHO haproxy is configured to remove/re-add some headers...
Header is there: curl -I https://forums.opensuse.org/images/misc/arrow.png HTTP/1.1 200 OK Date: Wed, 03 Mar 2021 06:29:21 GMT Server: Apache/2.4.43 (Linux/SUSE) Strict-Transport-Security: max-age=31536000 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1;mode=block X-Content-Type-Options: nosniff Last-Modified: Mon, 10 Nov 2014 15:14:41 GMT ETag: "74-507829f299a40" Accept-Ranges: bytes Content-Length: 116 Cache-Control: max-age=604800 Expires: Wed, 10 Mar 2021 06:29:21 GMT Vary: User-Agent Content-Type: image/png X-Forwarded-For: (null) IIRC in absense of such headers, browsers had a caching heuristic using the ratio between Last-Modified and when they last checked, so you do not get any improvement. Also a week is not that long - there might be users checking forums less often. And there seem to be a lot of different small images used. e.g. 29 on https://forums.opensuse.org/forumdisplay.php/668-Install-Boot-Login Maybe some pre-loading could improve user-experience there.