DirectAdmin theme's resources and browser cache

MMarko

Verified User
Joined
May 10, 2006
Messages
79
Location
eu
I noticed that all static resources DA theme / skin uses has not set expire time. Every single request for image, background, css resource is 200 OK, instead of 304 Not modified. I think with this small modification in DA server, DA panel user experience would be improved a lot.
 
Hmm.. because we do set the expiry/cache in the headers, eg:
Code:
[LIST]
[*][COLOR=#545454][B]Pragma: [/B][/COLOR][FONT=Consolas]max-age=65536[/FONT]
[*][COLOR=#545454][B]Cache-Control: [/B][/COLOR][FONT=Consolas]max-age=65536[/FONT]
[/LIST]

even with the code 200, in Chrome the "network" tab shows
Code:
(from memory cache)
after the first load, and loads instantly without any request at all after that.

The 304 response method would require DA to manage ETags (which it does not), and figure out, based on the request, if the browser already has the latest file, and based on that, return the 304 with no body at all.

So, 'yes', the 304 method may improve cases if the cache has expired, and an ETag is used after that.. but it would still be making a request anyway, which is the main slow-down.
I'm not sure if there would be that much gain by implementing it.

Let me know if I'm missing something :)

John
 
My bad, didn't notice that (from memory cache)... just opened dev tools and noticed 200 responses and concluded they're not cached...

In Chrome timings I've noticed some significant time spent in stalled state, some elements spent over 1sec stalled while WordPress site elements stalling rarely occurs and is under 10ms when it does occur. I guess these are differences of server implementation in DA and nginx on the other side? Maybe something can be done to speed it up?

Noticed max age is 65536 maybe it would help if it's 2-3 months?
 
Back
Top