3 ms·
Is this really how developers think? And what if the user does not download the .js file? And what if the user downloads the .js file but does not run it in a
by 801699 9y ago
Is this really how developers think?
And what if the user does not download the .js file?
And what if the user downloads the .js file but does not run it in an interpreter?
What if the browser authors refuse to process what is enclosed in script tags and to run Javascript?
Maybe they believe it consumes too much memory.
Based on your comment (trolling?), I think maybe Javascript is not the problem. It is developers with thinking such as yours.
If we put inline js or links to .js files in files requested via HTTP, then we cannot claim that users "chose" or gave "permission" to fetch these .js files or to run them. As another commenter stated, those requests were not initiated by the user, but by the browser.
The selection of browsers is small, and made smaller by web developers who promote use of certain browsers i.e., big fat intepreters that will run their needless Javascript. (The keyword is "needless". Almost always users can get the data they seek without running Javascript.)
These "favored" browsers present a massive memory hog and attack surface compared to the minimal tcp client required to retrieve text via HTTP.