Author Topic: No caching for static assets?  (Read 7944 times)

0 Members and 1 Guest are viewing this topic.

Offline daerid

  • Thread Starter
  • Posts: 4270
  • Location: Denver, CO
    • Rossipedia
No caching for static assets?
« 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.



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

PS: It's a custom style sheet

Offline tbc

  • Posts: 2366
Re: No caching for static assets?
« Reply #1 on: Sun, 12 April 2015, 01:14:12 »
is this made more complicated by https?

honest question.  really not sure.

noob dev ops -_-
ALL zombros wanted:  dead or undead or dead-dead.

Offline rowdy

  • HHKB Hapster
  • * Erudite Elder
  • Posts: 20942
  • Location: melbourne.vic.au
  • Missed another sale.
Re: No caching for static assets?
« Reply #2 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.
"Because keyboards are accessories to PC makers, they focus on minimizing the manufacturing costs. But thatís incorrect. Itís in HHKBís slogan, but when Americaís cowboys were in the middle of a trip and their horse died, they would leave the horse there. But even if they were in the middle of a desert, they would take their saddle with them. The horse was a consumable good, but the saddle was an interface that their bodies had gotten used to. In the same vein, PCs are consumable goods, while keyboards are important interfaces." - Eiiti Wada

NEC APC-H4100E | Ducky DK9008 Shine MX blue LED red | Ducky DK9008 Shine MX blue LED green | Link 900243-08 | CM QFR MX black | KeyCool 87 white MX reds | HHKB 2 Pro | Model M 02-Mar-1993 | Model M 29-Nov-1995 | CM Trigger (broken) | CM QFS MX green | Ducky DK9087 Shine 3 TKL Yellow Edition MX black | Lexmark SSK 21-Apr-1994 | IBM SSK 13-Oct-1987 | CODE TKL MX clear | Model M 122 01-Jun-1988

Ị̸͚̯̲́ͤ̃͑̇̑ͯ̊̂͟ͅs̞͚̩͉̝̪̲͗͊ͪ̽̚̚ ̭̦͖͕̑́͌ͬͩ͟t̷̻͔̙̑͟h̹̠̼͋ͤ͋i̤̜̣̦̱̫͈͔̞ͭ͑ͥ̌̔s̬͔͎̍̈ͥͫ̐̾ͣ̔̇͘ͅ ̩̘̼͆̐̕e̞̰͓̲̺̎͐̏ͬ̓̅̾͠͝ͅv̶̰͕̱̞̥̍ͣ̄̕e͕͙͖̬̜͓͎̤̊ͭ͐͝ṇ̰͎̱̤̟̭ͫ͌̌͢͠ͅ ̳̥̦ͮ̐ͤ̎̊ͣ͡͡n̤̜̙̺̪̒͜e̶̻̦̿ͮ̂̀c̝̘̝͖̠̖͐ͨͪ̈̐͌ͩ̀e̷̥͇̋ͦs̢̡̤ͤͤͯ͜s͈̠̉̑͘a̱͕̗͖̳̥̺ͬͦͧ͆̌̑͡r̶̟̖̈͘ỷ̮̦̩͙͔ͫ̾ͬ̔ͬͮ̌?̵̘͇͔͙ͥͪ͞ͅ

Offline tbc

  • Posts: 2366
Re: No caching for static assets?
« Reply #3 on: Wed, 15 April 2015, 01:13:32 »
bump for admin attention?
ALL zombros wanted:  dead or undead or dead-dead.

Offline daerid

  • Thread Starter
  • Posts: 4270
  • Location: Denver, CO
    • Rossipedia
Re: No caching for static assets?
« Reply #4 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:



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

Offline njbair

  • Posts: 2825
  • Location: Cleveland, Ohio
  • I love the Powerglove. It's so bad.
    • nickbair.net
Re: No caching for static assets?
« Reply #5 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.

Alpine Winter GB | My Personal TMK Firmware Repo
IBM Rubber Band "Floss" Mod | Click Modding Alps 101 | Flame-Polishing Cherry MX Stems
Review: hasu's USB to USB converter
My boards:
More
AEKII 60% | Alps64 HHKB | Ducky Shine 3, MX Blues | IBM Model M #1391401, Nov. 1990 | IBM SSK #1391472, Nov. 1987, screw modded, rubber-band modded | Noppoo EC108-Pro, 45g | Infinity 60% v2 Hacker, Matias Quiet Pros | Infinity 60% v2 Standard, MX Browns | Cherry G80-1800LPCEU-2, MX Blacks | Cherry G80-1813 (Dolch), MX Blues | Unicomp M-122, ANSI-modded | Unicomp M-122 (Unsaver mod in progress) | 2x Unitek K-258, White Alps | Apple boards (IIGS, AEKII) | Varmilo VA87MR, Gateron Blacks | Filco Zero TKL, Fukka White Alps | Planck, Gateron Browns | Monarch, click-modded Cream Alps

Offline jwaz

  • * based mod
  • Posts: 2070
  • #geekhack on freenode
Re: No caching for static assets?
« Reply #6 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


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.

Offline iMav

  • geekhack founder
  • Location: Valley City, ND
  • "En casa del herrero, cuchillo de palo"
Re: No caching for static assets?
« Reply #7 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.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 3282
  • Location: England
Re: No caching for static assets?
« Reply #8 on: Tue, 06 October 2015, 13:01:27 »
Had a quick browse on my phone (3g) and there's a definite improvement :)
                               
Ducky Zero, MX Reds    JD40, Jailhouse Blues           GH60
Soarer controller

Offline suicidal_orange

  • * Global Moderator
  • Posts: 3282
  • Location: England
Re: No caching for static assets?
« Reply #9 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?
                               
Ducky Zero, MX Reds    JD40, Jailhouse Blues           GH60
Soarer controller

Offline njbair

  • Posts: 2825
  • Location: Cleveland, Ohio
  • I love the Powerglove. It's so bad.
    • nickbair.net
Re: No caching for static assets?
« Reply #10 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.

Alpine Winter GB | My Personal TMK Firmware Repo
IBM Rubber Band "Floss" Mod | Click Modding Alps 101 | Flame-Polishing Cherry MX Stems
Review: hasu's USB to USB converter
My boards:
More
AEKII 60% | Alps64 HHKB | Ducky Shine 3, MX Blues | IBM Model M #1391401, Nov. 1990 | IBM SSK #1391472, Nov. 1987, screw modded, rubber-band modded | Noppoo EC108-Pro, 45g | Infinity 60% v2 Hacker, Matias Quiet Pros | Infinity 60% v2 Standard, MX Browns | Cherry G80-1800LPCEU-2, MX Blacks | Cherry G80-1813 (Dolch), MX Blues | Unicomp M-122, ANSI-modded | Unicomp M-122 (Unsaver mod in progress) | 2x Unitek K-258, White Alps | Apple boards (IIGS, AEKII) | Varmilo VA87MR, Gateron Blacks | Filco Zero TKL, Fukka White Alps | Planck, Gateron Browns | Monarch, click-modded Cream Alps

Offline daerid

  • Thread Starter
  • Posts: 4270
  • Location: Denver, CO
    • Rossipedia
Re: No caching for static assets?
« Reply #11 on: Mon, 26 October 2015, 12:16:51 »
hooray! Much much nicer, thanks iMav!