Skip to main content
15 events
when toggle format what by license comment
S Dec 12, 2020 at 17:02 history suggested Pang CC BY-SA 4.0
Fixed invalid link [1].
Dec 12, 2020 at 3:32 review Suggested edits
S Dec 12, 2020 at 17:02
Nov 11, 2020 at 14:41 history edited JacquesB CC BY-SA 4.0
added 1810 characters in body
Dec 12, 2019 at 18:24 comment added IMSoP @wvxvw As well as base64 being the opposite of compression, it's worth noting that most JS will in fact be compressed, completely transparently, by web servers, whether it's embedded in HTML or served as separate files, using deflate or gzip streaming compression This makes network bandwidth much less of a distinguishing factor between text and binary formats.
Dec 12, 2019 at 8:45 comment added VLAZ @wvxvw Base64 increases the size of the encoded text by as much as one third. So, I'm not sure how that helps when you'd prefer lower sizes of your web pages.
Dec 12, 2019 at 1:37 comment added Eric Lippert The result of this was that the implementation teams at Microsoft, Netscape and other companies were constantly making independent changes to the language, showing the designs to users, and then bringing the finished work -- sometimes after it had shipped to customers! -- to the committee for standardization. I could give you many examples; for instance, I was in the room when we designed the switch statement and the === operator, which were not in the Netscape implementation. Again, just so I'm clear, the notion that we had no choice but to draft Netscape could not be more wrong.
Dec 12, 2019 at 1:31 comment added Eric Lippert Just to make sure I'm absolutely clear here: the notion "The NS implementation is the reference implementation" was explicitly NOT a core principle of the technical committee. Similarly, the notion "a conforming implementation must do NEITHER MORE NOR LESS than what the specification requires" was explicitly NOT a core principle. Rather, just the opposite. The committee encouraged implementers to experiment with new features in a way that neither broke compat nor closed off future avenues for improvements, because the committee was explicitly interested in a living, evolving language.
Dec 12, 2019 at 1:22 comment added Eric Lippert @JacquesB: As one of the people making those choices I can assure you that we did have the choice to make changes to JS, and we occasionally made choices contrary to poor implementation decisions in the Netscape version. Once the standardization process started up, we worked closely with our Netscape counterparts as well as interested parties from other companies to ensure that the language evolved in a consistent and reasonable manner that created value for users without undue burden to implementers.
Dec 11, 2019 at 11:03 comment added JacquesB @wvxvw: Obviously it would be technically possible to embed base64-encoded bytecode in HTML - but it would be an immensely complicated solution compared to just embedding the source code. Just imagine the hassle of debugging.
Dec 11, 2019 at 11:02 comment added JacquesB @Luaan: OK I removed that sentence. It was in response to another answer which suggested this was some decision by MS. It was not. They had no choice that to copy JavaScript exactly as it was designed by Netscape.
Dec 11, 2019 at 11:00 history edited JacquesB CC BY-SA 4.0
added 449 characters in body
Dec 11, 2019 at 10:16 comment added wvxvw This is a completely solvable problem. Had been solved many times before JavaScript even existed. Just to give you one example: PostScript. A typical PostScript file will have most of its program embedded as compressed payload (which, at run time is decompressed and fed into interpreter). If you wanted to embed JS bytecode in HTML page you can have done the same thing as so-called "data-urls" do: use some text encoding, like Base64!
Dec 11, 2019 at 8:33 comment added Luaan Eh? Who claims Javascript was invented by Microsoft? Why would anyone want you to think that? Microsoft was part of the standardisation process (which produced the first version after IE 2 was released, with support for Javascript), but who cares? It's a bit silly thing to put on top of an otherwise good answer.
Dec 10, 2019 at 17:59 history edited JacquesB CC BY-SA 4.0
added 472 characters in body
Dec 10, 2019 at 17:49 history answered JacquesB CC BY-SA 4.0