3 ms·
There is a difference: a webpage is not a program, the program is the browser. The browser is a program to display documents, just like a text editor can displa
by alerighi 4y ago
There is a difference: a webpage is not a program, the program is the browser. The browser is a program to display documents, just like a text editor can display text, a PDF viewer can display a PDF or a video player can play a video.
The problem is that who make websites, instead of making documents, maybe built dynamically by the server and with some interactive elements in it, doesn't sent you a document but instead sends you an application that builds the document into the browser, basically turning an application that simply displays you document into a virtual machine that runs an entire graphical environment.
The fact is that most of the websites to function doesn't need a line of JavaScript, and still are downloading Mb of libraries to do what?
- slaymaker1907 4y agoI think the web is a great application framework, but I agree some sites really don't need as much JS as they use. For example, my note taking setup is a self modifying HTML file that relies heavily on JS for obvious reasons. Your typical blog or news site really doesn't need it in the same way.
- alerighi 4y agoI think that one of the problem of the modern web is that it's seen as an application framework, and we forgot the origin that is the browser as a document viewer, basically. Most of the problems wouldn't be even present if we reason in terms of documents, and in terms of operations that you can do on these documents (GET, PUT, DELETE, POST). You find out that for most website you don't need JS! One could argue that JS is an optimization because you don't load up again the whole page each time you navigate to a different URL. That is false: if you cache the assets that doesn't change between pages such as stylesheets and images correctly, downloading just the HTML of the page is something trivial. Look at the number of requests that a webpage that uses JS does: is that more efficient?
- deleted 4y ago[deleted]
- shadowgovt 4y ago> to do what? Mostly to polyfill around the fact that basic DOM manipulation is garbage and the default UI widgets are ugly.