365 reputation
129
bio website
location London, United Kingdom
age 21
visits member for 3 years, 5 months
seen Nov 13 at 22:27

Operations and Infrastructure Engineer at Songkick. RHCSA, Pythonista, Occasional Photographer, Frequent Starbuckser


Sep
24
awarded  Autobiographer
Jun
19
awarded  Nice Question
Feb
27
awarded  Famous Question
Nov
14
awarded  Notable Question
Jul
17
awarded  Popular Question
Jun
7
awarded  Yearling
Feb
2
comment Headers to prevent 304/If-modified-since/HEAD requests
After a bit of playing around, I've concluded the 365d expiry is not affecting our clients however I've dropped it down to be safe, it seems the Cache-Control: public,... was the key to this specific situation.
Feb
2
accepted Headers to prevent 304/If-modified-since/HEAD requests
Feb
1
comment Headers to prevent 304/If-modified-since/HEAD requests
Interesting, I'll lower the expires to 60 days and add the public flag, and see what happens. This seemed to be happening on link-clicks rather than F5s (according to Firebug and the server logs)
Feb
1
comment Headers to prevent 304/If-modified-since/HEAD requests
@DisgruntledGoat Ahh, you've made the assumption a .jpg file is actually an image rather than a text document. Welcome to my world =) (It's actually a text file that contains 'Hello World' for my testing, the software just renames all files sequentially IMG_xxxx.jpg regardless of type. Cool huh?)
Feb
1
asked Headers to prevent 304/If-modified-since/HEAD requests
Jun
27
comment How is this site so fast?
@John Weird, I have no relationship with the asker (Other than a couple of emails). I use Tor (My network blocks stackexchange) but I doubt we would have ended up on the same exit node. But there is nothing else I can think of that would cause that
Jun
27
awarded  Nice Answer
Jun
27
comment How is this site so fast?
@Praveen So, quite a lot =) But we also use SSD's and a load of other stuff on top of that. This is not the only website we host so we're probably at about 500k hits a day (Those are actual page views, like I say all static content comes from our CDN or media server)
Jun
27
comment How is this site so fast?
@Praveen liquidweb.com/cart/content/dedicated/Enterprise/Plan2 =)
Jun
27
awarded  Commentator
Jun
27
comment How is this site so fast?
I think the low page speed score is mostly down to the images. We need to optimize them but I haven't got round to doing that yet. Also CSS sprites would be better but there are a few things I should probably look at =)
Jun
27
comment How is this site so fast?
@user8628 As for the AJAX pages, we use Python to create the page data then pass it on to our templating system (Mustache) as an array of variables. So instead of rendering the whole template, just render that one page and pass the rest of the variables (Title, meta tags etc.) to Javascript to insert them to the right place.
Jun
27
comment How is this site so fast?
@user8628 Multiple subdomains are easy, every file has a numeric timestamp for when it was added (POSIX time), if you divide this by 4 and take the remainder you will always get the same subdomain if that makes sense. So say an image has the timestamp 1309187478, doing (1309187478%4)+1=3. So we use dftba3.ecogeek-cdn.net as the domain for that media. That domain will always be the same because the timestamp never changes. If you were working with MySQL you could do this based on the primary key of the object but any non-changin integer will work
Jun
27
awarded  Teacher