The Fastest Blog in the World (2015)
jacquesmattheij.com
jacquesmattheij.com
I really like the minimalism of these. I guess the interesting part of the linked article was the guy wanted to make his blog look exactly the same as it was before he made the optimisations
Is this a joke?!
I also recently made a minimalistic news aggregator for german news: http://textnews.neocities.org
I think the idea here is to get a modern look with minimal code. Like the first page shows (the one without styling) it's easy to create a light weight website, it's hard to make it look like its from 2017.
Is it really premature? You already had a blog that worked, saw a need (or challenged yourself?), and acted. Sure, this might have been a bit overboard, but I think that it was the right time for this optimization (not premature).
> Optimizing a thing like this is likely a bad investment in time but it is hard to stop doing a thing like this if you’re enjoying it and I really liked the feeling of seeing the numbers improve and the wait time go down.
You did a good job. And I like seeing those numbers go down, too!
It's the only page you can read on a GPRS connection (http) and you can literally see every packet as it's transmitted, because the page is rendered bit by bit.
and you can literally see every packet as it's
transmitted, because the page is rendered bit by bit.
Beg pardon?It's pure, unstyled HTML -- you could read the site by piping curl into less -- and it should easily render incrementally; I'm just not sure how well it works when you use gzip and TLS (and I couldn't not use TLS when I just tried).
[1] https://blog.nightly.mozilla.org/2016/11/07/simulate-slow-co...
[2] https://developers.google.com/web/tools/chrome-devtools/netw...
[3] http://nshipster.com/network-link-conditioner/ (We use this to throttle Websocket transmissions, which, last I checked, the browser devmode throttles don't apply to.)
I have a basic-ish theme, and I use Drupal's AdvAgg module to aggregate and minify JS and CSS, as well as a few other tricks to get page loads smaller. Finally, I use Nginx's dead-simple proxy cache to make most page loads take < 600 ms (and faster, if you're near NYC, where my DO Droplet is located).
See, for example: https://www.jeffgeerling.com/blog/2017/tips-managing-drupal-... (~600 ms from STL, MO, USA).
Obviously, the more images and other elements (e.g. social embeds, analytics and other junk), the more time spent downloading the page.
But, IMO, there's no excuse for your personal blog to take more than 1s to render and fully deliver a page, with an exception if you embed videos/audio (e.g. podcasters).
The average website on teh internets, in my opinion/experience, is bloated to hell. And i'm not talking about functionality here.
600 ms is appalling. Most site should be able to get under 50 ms easy (ignoring internet latency). A blog should be less than 25-30 ms, even if it has to hit the database.
It's turning out to be quite a fun challenge, reminiscent of early web days when I'd muck about trying to shave 2k off a JPEG.
Hopefully notions such as "critical" CSS and inlining to reduce requests might encourage the re-emergence of lean yet visually pleasant websites.
I do roll all my own code (never touched jQuery et al), mostly because I can and I find it weirdly enjoyable. But threads like these do make me wonder if all these nice tools we have these days are really just a crutch for bad programming practices. I mean I know tech jumps exponentially with each iteration but I swear the performance gained by newer technology is just eaten up straight away by developers writing heavier code to accomplish the same things as before.
I know this all sounds hyper-cynical and I do like my compositing display manager with wobbly windows et al so I'm hardly in a position to moan about bloat. But I guess my rant is about how poor web markup is for expressing modern documents (let alone full blown web applications). Well that, and I just needed to rant because I'm stuck in a hospital waiting room at 1 in the morning...
An old DOS file manager [1], written in assembly. Super fast and responsive, tiny size -- a fraction of Norton Commander &co's, never mind any modern tools.
Whenever I have to deal with the insanely inconvenient cluster fuck that is modern file managers (OSX Finder!), I probably feel the way you do about "modern web development".
Hope your hospital visit goes well.
I hope your visit went well.
Hope the hospital visit turned out okay.
The popular CMSes that are mentioned here (WP, Drupal), are not designed. They where mostly hacked together and became immensely popular before any thorough software design took place. They come from a time where software design was not much applied to "web scripts".
> [...] to be behind a caching layer like Varnish.
Varnish 1.0 is from 2006. WordPress is from 2003 and Drupal from 2000. These popular CMSes where certainly not made with proxy-caching in mind.
You can properly architect and write "your own" CMS in a compiled language (like Go, Rust, C++, OCaml or Haskell) and have <10ms response times (including the db queries). It will just lack the features, plugins/modules, and market pull that WP/Drupal have.
Hacked together is still a design. It may not be a Good design, but regardless they are made to be behind a caching layer. Also, Drupal 8 is pretty well designed and thought out.
>Varnish 1.0 is from 2006. WordPress is from 2003 and Drupal from 2000. These popular CMSes where certainly not made with proxy-caching in mind.
Software changes over time, and regardless of timelines the nature of CMS's is to generate output that stays the same, which is good for caching layers.
>You can properly architect and write "your own" CMS in a compiled language (like Go, Rust, C++, OCaml or Haskell) and have <10ms response times (including the db queries). It will just lack the features, plugins/modules, and market pull that WP/Drupal have.
This highly, highly depends upon what you're building. Plugins and modules are not the reason for slowdown in CMS's, the reason is that the data is abstracted into understanable constructs that can take in all forms of data. This requires lots of queries and code to standardize things. In many cases, you're not going to build something better that is as functional or friendly to future developers.
That's degrading the definition of design. WP was not even hacked-together/designed to be a full-fledged CMS in the first place!
> Drupal 8 is pretty well designed and thought out.
It is certainly more designed then the early versions of popular CMSes. But one thing for sure, Drupal 8 is still not designed to be fast.
> the reason is that the data is abstracted into understanable constructs that can take in all forms of data.
Not all languages suffer from slowness by abstractions. Rust, OCaml and Haskell come to mind. These languages are "designed". Again I'd argue that PHP is not designed but hacked together without much thought for design -- find some Rasmus quotes and you know what I mean.
Its not. Bad designs are still designs, design is not a word about quality, it is a word about intentions and implimentation of them.
>WP was not even hacked-together/designed to be a full-fledged CMS in the first place!
Original intentions have no bearing on how the software is now. WP definitely does have issues, but it is designed to be a full fledged CMS now.
>Not all languages suffer from slowness by abstractions.
In this case, they do, because you have to get your data from a database, we're not even talking about programming languages, but constructs of data and how they're sorted. Drupal 8 has a very interesting methodology to categorize data that is well done enough the Views module can take that and is capable of building most data-centric sites. You can build a pure catalog like digi-key with normal drupal 8, no plugins or modifications, just setting the control panel and a theme.
>But one thing for sure, Drupal 8 is still not designed to be fast.
It is, actually. But it being 'fast' is behind its ability to work with data and make it actually configurable to define your own editing workflow and how that gets represented on your editors dashboard, connected directly to how its viewed on your website. Your CMS does not need to be 2fast, since it should be behind caching layers.
>Not all languages suffer from slowness by abstractions. Rust, OCaml and Haskell
All languages suffer from the abstraction higher level languages like PHP, Python or JS provide, namely that they're not typed or compiled and can work with very dynamic data.
Because users like the user friendliness of WP editing but I do not like the bugs, security misery etc, I tend to export WP sites to HTML and make things that must be dynamic with some webservices and React.
BTW: What causes this 11 points + 4 comments thing to hit the front-page of HN? Just wondering, as I believed it's the number of comments + popularity that pushes the link to the front.
That said, I did not go as far as this author when designing my personal blog[1], I considered the following tradeoffs worth the slight cost:
* I didn't inline images or CSS. I can see the appeal but I don't believe it is really worth it unless you have relatively small amounts of CSS. In theory HTTP2 is supposed to help here as well, and on really slow connections inlining can slow things down as the browser is forced to download the inlined stuff instead of progressively displaying the page as it can.
* I ended up deciding that the custom font I wanted to use was worth the cost. I thought hard about it though and would perhaps decide against it if I was designing the site again.
* You can drive yourself insane trying to minimize traffic for images. Should you try to serve 2x images for retina displays? Small images for mobile devices? In the end I just serve the same images for everybody and minimize the use of images overall. It works for me because I don't have a lot of need for splashy pictures.
* I avoided any type of social media button or plugin, they tend to make additional requests back to the mothership. Very few people actually liked or +1ed anything on my old blog anyway, but people with better blogs might find the trade-off worth it.
I do have one external bit---a block pointing to my Amazon affiliate account (which might have Javascript, I don't know, probably does). It's disabled for mobile devices (via CSS---I use CSS to change the layout to make it more mobile friendly).
I thought a lot about images, since I have a lot of game screenshots. I decided that since my redesigned homepage will only show summaries of a post with the first image, that my original rule of images no bigger than 80k was good enough. It makes the homepage about 500k on a uncached first hit, but I figure that's more useful than 500k of CSS and JS.
Not only did I decide that my custom fonts were worth it, I started serving them in the smaller WOFF2 format, instead of (original) WOFF. Once I looked at the browser support, it was a no-brainer.[1]
I'm also kind of stingy about browser requests. I've gotten it to no more than 10 (homepage; individual articles are less). If a resource is fairly small, it might not be worth the wait for the browser to open a connection and download it. All my fonts are base64 inlined into my CSS. Sure, it makes the CSS bigger, but the extra request is gone, and after gzip compression, it's almost the same size. I used Font Squirrel to eliminate unused glyphs from the fonts I use.[2]
One thing I noticed about your CSS is that it has a enormous textual redundancy, but it's not gzip compressed. You can get an easy speed up by enabling it there.
[0] https://theandrewbailey.com/
It means that when you _do_ add an image, or some JavaScript, you're doing it because it demonstrably adds something of considered value, not just because it's easy.
Take a look at the JavaScript, it is so beautifully anti-best-practices! No framework, global namespace pollution, whatever: it just works!
These are solutions that do not belong in the front end of web development. Something else must work instead.
Both sites score 100 / 100 on desktop & mobile on Google PageSpeed Insights.
Here's a dummy test page I made a while ago to see if I could create a fairly lengthy, fast-loading text page for slow mobile connections. It's hosted on a cheap shared hosting plan, so it may well fall over (or not!)
Version A (no font loading): http://interfacesketch.com/test/energy-book-synopsis-a.html
Version B (loads custom fonts - an extra 40kb approx): http://interfacesketch.com/test/energy-book-synopsis-b.html
The image at the top of the page hasn't been optimized (about 40kb), however I do think aesthetics are important in page design and I'm against reverting to a plain HTML look with no CSS styling. The test pages above are plain looking but, I hope, reasonably pleasant to look at. (The custom font version looks nicer in my view than the no font loading version, but of course it adds a bit of extra page weight).
And it seems it wasn't learned...
bayesian-goat:CreditScoreIcons heyoo$ httping http://jacquesmattheij.com/the-fastest-blog-in-the-world
PING jacquesmattheij.com:80 (/the-fastest-blog-in-the-world):
connected to 62.129.133.242:80 (329 bytes), seq=0 time=1023.28 ms
connected to 62.129.133.242:80 (329 bytes), seq=1 time=554.06 ms
connected to 62.129.133.242:80 (329 bytes), seq=2 time=555.50 ms
^CGot signal 2
--- http://jacquesmattheij.com/the-fastest-blog-in-the-world ping statistics ---
3 connects, 3 ok, 0.00% failed, time 5052ms
round-trip min/avg/max = 554.1/710.9/1023.3 ms
bayesian-goat:CreditScoreIcons heyoo$ httpstat http://jacquesmattheij.com/the-fastest-blog-in-the-world
Connected to 62.129.133.242:80 from 192.168.1.1:53437
DNS Lookup TCP Connection Server Processing Content Transfer
[ 521ms | 344ms | 278ms | 559ms ]
| | | |
namelookup:521ms | | |
connect:865ms | |
starttransfer:1143ms |
total:1702ms
Edit: Noticed interesting things about bettermotherfuckingwebsite.com(AmazonS3, Content-Length: 1943) and motherfuckingwebsite.com(nginx/1.10.3, Content-Length: 5108) - the Content Transfer part on those two only takes 1ms! Meanwhile dadgum.com has Content-Length: 9344 and transfer takes 162ms. Anyone got ideas why the massive difference?GZIP helps considerably here, too.
That's the money quote.
Hacker: It's simple: clone the repo, install gcc, then dependencies, open command prompt, compile, now you can do the same thing as Microsoft Word, well kind of.
[This comment is 99% joke; still might be useful to look at the community aesthetic from an outside perspective]
https://tools.pingdom.com/#!/sNNVG/https://josharcher.uk/cod...
vs
https://tools.pingdom.com/#!/dSNHcL/http://jacquesmattheij.c...
I enjoyed this post the last time it came up[0] and learnt a few tips from it. Particularly interesting was the difference making CSS inline made, even for reasonably large amounts of CSS.
I highly recommend the advice of Heydon Pickering [0]. The best optimizations can be made by not writing code.
If I disabled the custom font I'm using (87.7KB) the home page of my "blog" [1] comes in at ~1463 bytes. 802 bytes of which is the CSS, leaving under 1kb of HTML per post once the CSS hits cache. It would have an average load time of ~45ms.
[0] https://vimeo.com/190834530
[1] nadyanay.me
A Jekyll html theme that looks like style of Medium.com and uses Google AMP.
Sounds like the licenses we receive from Cisco. They are literally an A5 sheet of (thin) paper packaged, 3 boxes deep, in something easily the size of a shoe box.
Personally I prefer loading the core stuff instantly while still allowing for a rich site that progressively loads micro-libs and media.
Proving that all that bloat and styling (on other sites) is a complete waste of time if there's no value in your content.
Dan focuses on just the content, and it's worked, very very well.
And most blog visitors are traffic by some random success post linked from some popular site or one-off search traffic.
So, they won't stick around for cache to matter anyway -- better give them a nicer first experience in the off chance that they do stick because of that.
My site is pretty lite :), though not in the ball park of the OP. Used to be even lighter, need to trim it down again some.
He loads 4KB in 75ms, which is about 53KB/s. I load 47.82KB in 210ms, which is 227KB/s. Technically, I'm loading 4 times faster.
This is also why you can't test available bandwidth reliably with a short transfer.
- a custom font (i like fonts)
- being fast on wifi
- being fast on LTE
- being reasonable fast on slower networks (maybe don't load the font etc.)
Edit: trying to be not too provocative :)What's reasonable about serving MBs of BS to people who don't care for them just to follow the latest design trends, or the latest frameworks, or whatever?
If I could take only the text from your web page, I would probably be all for it. Maybe after reading it I might care to see the rest of your site.
A text blog honestly has no business being drastically larger than, you know, the text I came to read. Which is why I like RSS readers.
I like things that look nice, not fancy, over the top animated. But a good picture paired with a nice font, maybe combined with a tasteful color scheme and i have much more fun reading. It doesn't that much. Idk, maybe we're just wired different, but for me reading RSS in every break would be too repetitive visually ;)
Also it's more secure to have a static site.
Also it's simpler to manage in the long term.
win win win
If you're a company like Facebook or Google, you're looking to eke growth out of every corner of the Earth, including those with really slow Internet.
So after you've conquered the 1st and 2nd world countries, you start optimizing for additional tiers. (And optionally launch balloons that shower Internet upon untapped markets)
However, if you're not one of those two behemoths, then your target audience is probably located within ~3,500 miles of you/your servers (which would translate roughly into a RTT latency figure of ~100 milliseconds, and add 40ms for those folks on low-grade ADSL or cellular connections).
Your barebones site is competing with other fully-featured sites that are taking advantage of the high bandwidth delay product that's available to them.
Unless, competing for eyeballs is not one of your goals.
But regardless, optimizing for reach beyond that mileage range by slicing bits here and there, rather than bolting on a CDN, is probably a premature optimization.
To throw out a new presumption, I'd say that if you measured user's rage, they're more angry with packet loss than with consistent latency.
One is predictable and can be planned for ("open 5 tabs, go do some chores, come back in 15 minutes when they're loaded").
The other is absolutely infuriating ("open 1 tab, get teased by some amount of partially loaded objects, spend the next 5 minutes refreshing due to socket timeouts, cross fingers that not too many refreshes evicts items out of the local cache, give up")
I would choose a static site, preferably github pages because of its simplicity and easy update-process. We use elaborate compilers every day to optimize our code, so why is there no "global" optimiser for static pages that exclude a few common libraries that one assumes are already cached (if you really need js)? Maybe it's because i don't know that much about "real" web development besides some dashboard-frontend for a way more complicated backend. But this was more composing bootstraps than developing. I usually am more interested in the backend. But to me these seem to be client-problems. Some quick inlined js for selecting the correct image and whether to load the font should not waste much time. Or is this possible via CSS? In my mind this should not be an impossible task.
I have always wondered why some website display nothing until loading of font finished.
The web sucks if you have a slow connection (danluu.com) https://news.ycombinator.com/item?id=13601451
Having to use webpages like we are in the 90s again doesn't seem like a good solution, or at least i don't like it (of course the opposite is also not exactly successful. AMP is being forced upon everybody for a reason).
You underestimate the tools you have now. Mobiles are mostly on Android 4.4+, which gives us fairly advanced CSS support for example. There is a plethora of oldschool JS which can be easily replaced by simple CSS rules, a trivial example: resizing images to viewport - just use vw and vh as units, done.
I remember the word DHTML too well to know how easy it is to misuse JS. Always have a working, HTML (and maybe CSS) only solution first, especially, if you content is text. Only after this add the JS, and make whatever you want with it, make it fancy, part-reloading, whatever, but first make sure you can load your content, because that is the main reason for the site. (Again, not talking about webapps. Loading gmail is an idiotic idea on a GSM connection, just use IMAP and an offline client, if that worked during the 80s and 90s, it'll be fine.)
Apply GPRS cap in Chrome and see what's it like in rural ENGLAND. Not India, not China, the very middle (maybe not the actual, geographical middle, but you get my point) of the UK, with terrible signal reception. ( F12 -> network -> 'No throlling' dropdown ).
https://mbasic.facebook.com is a thing for good reasons. (and, by the way, a good way to browse FB without giving them the ability to trace everything via JS).
So no, not like the 90s: do it for modern browser, but the energy, bandwidth and cpu efficient way and don't block text with JS.
No one can afford not to be accessible from billions of devices from millions of people from outside of "The West".
I run jinja2 templates through Grunt and it:
* Optimizes all images - this saves megabytes upon megabytes
* minfies css, html and javascript
* the static files are served via nginx.
Pure is responsive and comes in at just 3.8kb minified and gzipped.
The result is pretty close the fastest blog in the world, and it's super simple to get started with. You can put a CDN in front of it for even better performance if you like.
Neither is Internet speed (even near to) infinitely scalable (even forgetting cost), despite the dreams or hype of some.
Not to mention people on slower lines, as others have said.
Multiply those multi-MB (for pico-content) sites by gazillions of people accessing (some of) them, and the slowdown of the Net becomes serious real fast - no matter what the gung-ho types might claim or say.
But this is impressively fast nonetheless.
Please, please don't do that: it means that visitors without JavaScript enabled simply cannot view your page.
If a visitor wishes to configure his browser not to download images until he scrolls near them, that's certainly within his power. But if you break your page and only unbreak it for those with JavaScript, then your visitors have no choice.
The percentage of folk with JS disabled seems to be around 1% of visitors to generic web sites (no hard figures here, only search hits on quora and a few analytics sites), and is likely to be pretty much zero for mobile users, so... I'm OK with the trade off, since I'd much rather improve the experience for those who pay through their nose for mobile bandwidth.
I know that your heart is in the right place, but I believe that you're making the wrong decision. I suppose it's one thing if each image is also a link to the high-res source (although I wonder why suitably-scaled images can't be served to everyone), and if the images are irrelevant to your text. But particularly if there is no way for clients without JavaScript to see images, then I think you're breaking the web.
I think that JavaScript disabling will become more and more common as advertising and tracking becomes more and more intrusive. A client who enables JavaScript disables security, disables privacy and disables performance.
Powerful enough to use asset caching / on-build minification / direct deploy to s3 / dynamic page generation from JSON, light enough to load in the blink of an eye.
Would it not be possible to do something like this? (pseudo)
on page request:
if (!user_has_visited_before) { insert_css_as_inline_into_html(); lazy_load_css_file_with_js(); }
else { insert_link_to_css_file_into_html(); }
In the meantime in Romania: http://imgur.com/a/UfhoD