3 ms·
To be fair, since it's your thing and you're going against conventional wisdom, it's probably your job to demonstrate it's better. As it stands, you're re-send
by jasonkester 16y ago
To be fair, since it's your thing and you're going against conventional wisdom, it's probably your job to demonstrate it's better.
As it stands, you're re-sending all your images and all your css and all your javascript to every one of your users every time they ask for a page on your site. So if I like your blog and read 50 articles, you've sent me that stuff 50 times over.
If you come to my site and flip through 50 pages, you'll get one css file, seven images, and one javascript file from the first page you request, all minified, gzipped and compressed just like yours is. The only difference being those extra requests, which might end up faster overall since they're to a CDN endpoint at your end of whatever continent you're on.
For the next 49 requests, all you get is content.
- sramov 16y agoI don't have any JavaScript, CSS is small, there is only one tiny image which is very small even base64 encoded. So I don't think this applies in my case. For bigger advanced sites, yes, you are right. Up to certain point, this is 'better', from the certain point, it is not.
- theli0nheart 16y agoYou could probably do one better one yourself if you served the CSS separately (with the inline images included). Two requests isn't that bad. And that's only two requests the first time someone visits your site--the next visits will have cached the CSS and will only request the HTML. But I definitely see the novelty in only having one.
- blaix 16y agoI was thinking this exact thing while reading his article (losing the benefit of caching external files locally). It would be my guess that this does improve performance for single requests (like an article that gets popular on HN...), but as you said, reading 50 pages would be worse. Still it's very cool, especially for a minimalist blog.