Skip to content

Comment on Maybe we could tone down the JavaScript

Comments

The Twitter page is a perfect example of why we use JavaScript for this stuff: because full-page loads just to hide a div is a shitty user experience. Scroll positions jump around, you've made a client-side action into a server one, etc.

The whole of html is full of these. Let's be blunt: it's a terrible platform, just as JavaScript's DOM API is terrible. Everything about the web is bad, but we make it good thanks to the combined might of the computing industry.

JavaScript's a mediocre language being used to pave over the weaknesses of a layout engine that can't centre things vertically and can't navigate without slow server interactions unless you want to confuse the user with one long page full of #anchors.

With progressive enhancement, Twitter could provide basic functionality with full page loads and the like, and use JavaScript to replace these with a better user experience.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.