geekhack

Site Announcements and Feedback => Announcements/Feedback/Suggestions => Topic started by: daerid on Sun, 12 April 2015, 00:52:10

Title: No caching for static assets?
Post by: daerid on Sun, 12 April 2015, 00:52:10
No idea how easy/hard it may be, but GH could definitely benefit from turning on basic HTTP caching (Last-Modified / If-Modified-Since / 304 Not Modified) on static assets.

(http://i.imgur.com/d6R9Bwc.png)

Not sure I need to download the css/images/headers/etc every page I visit.

PS: It's a custom style sheet
Title: Re: No caching for static assets?
Post by: tbc on Sun, 12 April 2015, 01:14:12
is this made more complicated by https?

honest question.  really not sure.

noob dev ops -_-
Title: Re: No caching for static assets?
Post by: rowdy on Sun, 12 April 2015, 01:48:11
HTTPS just uses SSL to encrypt the traffic.  Once the page is initially received the browser decrypts it and decides which assets it can retrieve from the local cache, and which ones it needs to fetch from the server.
Title: Re: No caching for static assets?
Post by: tbc on Wed, 15 April 2015, 01:13:32
bump for admin attention?
Title: Re: No caching for static assets?
Post by: daerid on Sat, 12 September 2015, 14:39:42
so it's been almost 5 months.

This forum feels very, very sluggish compared to most sites, as all the static assets have to be downloaded for every page request. Not only does it make the site feel slower, it is wasting a ton of bandwidth, at potentially increased cost, completely unnecessarily.

It seems like it's a quick/easy fix for potentially a big win. From the SMF website:

(http://i.imgur.com/5fFX8TM.png)

This could be done in like, 5 minutes and make the site much more enjoyable all around, and save you guys on bandwidth costs.
Title: Re: No caching for static assets?
Post by: njbair on Sat, 12 September 2015, 14:59:25
Can't say I've ever noticed the site feeling sluggish. Which is definitely surprising of we're not doing any caching.

This seems like a no brainer to me.
Title: Re: No caching for static assets?
Post by: jwaz on Tue, 06 October 2015, 10:35:50
so it's been almost 5 months.

This forum feels very, very sluggish compared to most sites, as all the static assets have to be downloaded for every page request. Not only does it make the site feel slower, it is wasting a ton of bandwidth, at potentially increased cost, completely unnecessarily.

It seems like it's a quick/easy fix for potentially a big win. From the SMF website:

Show Image
(http://i.imgur.com/5fFX8TM.png)


This could be done in like, 5 minutes and make the site much more enjoyable all around, and save you guys on bandwidth costs.

Thanks for looking into a fix, we'll see what we can do.
Title: Re: No caching for static assets?
Post by: iMav on Tue, 06 October 2015, 12:35:45
Good suggestion. 

Caching of most static content should be happening now.  Let me know what you think.
Title: Re: No caching for static assets?
Post by: suicidal_orange on Tue, 06 October 2015, 13:01:27
Had a quick browse on my phone (3g) and there's a definite improvement :)
Title: Re: No caching for static assets?
Post by: suicidal_orange on Sun, 11 October 2015, 03:57:12
Not sure if it's possible or worth the effort but now that the header image doesn't appear gradually it's noticeable that my avatar just below it does, so I think it's still download on every page - can this be cached too?
Title: Re: No caching for static assets?
Post by: njbair on Sun, 11 October 2015, 06:19:34
I don't know if it's related, but attached images recently stopped displaying in Tapatalk. I just get these little broken icons.
Title: Re: No caching for static assets?
Post by: daerid on Mon, 26 October 2015, 12:16:51
hooray! Much much nicer, thanks iMav!