I love to embed <script> tags in the <body> and its all over the place. This have the implication that the generated code becomes human-unreadable.. but my concern is.. other than that what other implications do we have?
Is it true that a browser has to do more “work” when we have like 300 generated stand-alone tags embedded all over the place within the tag?
Yes.
Each time the browser encounters a
<script>tag, it needs to fire up a Javascript interpreter.However, you shouldn’t worry about that; you should use whatever approach is easiest to understand and debug.