Why not sending JavaScript files in browser-specific bytecode? [closed]
There is no universal bytecode for JavaScript, but most JavaScript engines have their own bytecode. Since JavaScript files travel as source code string, they have to parse/compile source code string into bytecode at before execution. However, as we can specify a user agent type (e.g. browser type and version) in HTTP request, can't we make the server keep bytecode for each browser and respond accordingly to save some time at client? What's preventing us from taking this approach? I don't think browsers will have no problem even if some JavaScript files are given in bytecode and others in