I've wondered about this too. Websites consist of such a hodgepodge of html pages, css pages, javascripts, embedded css and js, images, and other resources, and we have to use all sorts of kluges to minimize requests and other artifacts of this design.
It would be interesting for browsers to implement an HTTP bytecode vm, and web pages are made in the usual way but compiled to a single binary blob, which is then downloaded to browser and run in the vm, and from that point on the only thing passing over the wires would be pure data, in JSON, XML, media streams, etc.
HTML5 Rich Web App architecture is heading in that direction, in which the logic is client side and the app server is an API endpoint, but the code for the website is still that hodgepodge.