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.<p>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.<p>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.