I am looking at some html released abroad for developers. They use comments inside their external script loading tags - as far as I know, this was only useful for very old javascript non-obvious browsers that used to render scripts as text - is there any modern purpose for this or is it now completely redundant?
<script type="text/javascript" src="path/to/file.js"></script>
Thank you in advance
// Update after comments below: It turns out that comments cracked the problem in the content management system, where it would display the tag as
<script type="text/javascript" src="path/to/" />
without any comments present - so the answer is that they can use any use in general web development, but there are some specific circumstances in which they can be useful. Kudos to Caspar Kleine for this.
source share