TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

June 05, 2023, 04:40:56 AM

Login with username, password and session length
Members
  • Total Members: 3,864
  • Latest: Joonoz
Stats
  • Total Posts: 194,365
  • Total Topics: 21,157
  • Online today: 106
  • Online ever: 3,540
  • (September 03, 2022, 01:38:54 AM)
Users Online
Users: 0
Guests: 70
Total: 70

imPluse2 Leverage browser caching

Started by abraamz, April 17, 2015, 08:51:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

abraamz

Quote
Leverage browser caching
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
I understand that many of the images should be taged to expire after some time.
Is this theme related?
Is it something that can be set from the theme at each <img> tag, from SMF with a php function or at server level like with an .htaccess file? 

bloc

Well, sort of..but that part is a bit more complex. Images supplied by the theme can be somewhat leveraged by setting the theme headers in the HEAD section(its not usually, which means its using the browser default)..but downloading an attached image is all done in Sources and the theme have no control over it.