Let’s leave the networking aspect aside for a moment.
When a language is compiled, the source files go through a pipeline of parser -> preprocessor -> compiler -> assembler -> linker, to end up with an executable. With interpreted languages, the source code is instantly executed line by line by an interpreter software. With JIT languages, the program gets compiled and optimized into portable bytecode, which is run by the language’s runtime.
If I had to guess, web pages (i.e. HTML/CSS/JS) are most likely run by an interpreter that is a web browser, but isn’t that inefficient given that most of what people do on computers is browsing the web? What about browsers, what standard is there that specifies how each language should be run/rendered? What pipeline does a webpage go through to end up as a process in a computer?
Yes html is all parsed and rendered by the web browser. What the elements do and how they interact and are displayed is defined by a standards body like the w3 consortium https://www.w3.org/TR/2014/REC-html5-20141028/
There’s traditionally been differences in the implementations of those standards between browser companies, thus causing browser compatibility issues where a site may say it doesn’t work in Firefox, or requires chrome or whatever. Though most major browsers use Chrome’s rendering engine now except for Firefox and its derivatives.
Yes I suppose it is less efficient than precompiling a webpage and serving it as a package that gets downloaded and “executed” though that then opens you up to cross operating system compatibility issues such as Linux and windows not being able to run binaries compiled for the other os. Html was conceived at least in part to be agnostic in that way I believe. As a “hypertext mark up language” it was a way of formatting text for easier reading
Apple’s browsers don’t either. They share a common ancestor, but they’re now different rendering engines.
If it was pre-compiled that could also cause issues not just across operating systems but also the architectures, right? Like x86 on desktop versus the ARM architecture most mobile devices use?