Hacker News new | past | comments | ask | show | jobs | submit login

I found the article an interesting read, however I couldn't help but think we are talking about AMP and small sites on Medium. When I download that article from Medium with wget I receive a 142K html file that is surprisingly small in this day and age, but still bloated more than is needs to be.

Using this script[0], I was able to get it down to 14K. Then further cleaning it up in emacs and adding <img> tags, I got the html down to 10k. That means it should take probably less than 5 seconds to load the html (not including the massive images) on a 5KB/s connection in Australia (more common thank you might think in the country areas, although getting much better with the NBN roll out) or any other 3rd world internet countries.

You can test the resulting html in this gist[1]. Please note I did that in about 20mins, and did not test on mobile, so it is not perfect. I expect the images need to be scaled to fit on mobile. Also I only used the <style> tag to keep it as one file, I don't recommend doing that on real websites.

I really hope more people start caring about saving bandwidth and client side resources (CPU, RAM, etc.)

[0]: https://gist.github.com/cjbayliss/b0042b5c7b46aebd5b40a85855...

[1]: https://gist.github.com/cjbayliss/4b9f5b5cc7a4dde8efcb4b06c1...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: