have a modern purpose? [duplicate]", "text": "<p>I'm reviewing some html produced by an outside shop. </p>\n\n<p>They use comments inside their external script loading tags - so far as i'm aware this was only useful for very old javascript unaware browsers is there any modern function for this or is it redundant?</p>\n\n<pre class="prettyprint"><code><script type="text/javascript" src="path/to/file.js"><!--//--></script> \n</code></pre>", "answerCount": 1, "upvoteCount": 771, "dateCreated": "2012-02-26 18:59:43", "dateModified": "2022-09-19 07:19:05", "author": { "type": "Person", "name": "MJWadmin" }, "acceptedAnswer": { "@type": "Answer", "text": "<p>No, the habit has not had any grounds for a <em>long</em> time. It was meant to deal with browsers like Netscape 1. Check out e.g. these history notes: http://javascript.about.com/library/blhtmcmt.htm</p>", "upvoteCount": 112, "url": "https://exchangetuts.com/does-script-script-have-a-modern-purpose-duplicate-1640431264639370#answer-1652378728602175", "dateCreated": "2022-09-13 07:19:05", "dateModified": "2022-09-19 07:19:05", "author": { "type": "Person", "name": "Jukka K. Korpela" } } } }
I'm reviewing some html produced by an outside shop.
They use comments inside their external script loading tags - so far as i'm aware this was only useful for very old javascript unaware browsers is there any modern function for this or is it redundant?
<script type="text/javascript" src="path/to/file.js"><!--//--></script>
No, the habit has not had any grounds for a long time. It was meant to deal with browsers like Netscape 1. Check out e.g. these history notes: http://javascript.about.com/library/blhtmcmt.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With