3 ms·
In the bad old days of early web development, browsers that didn't understand the script tag would display your code in the document. They allowed html comment
by zerohp 16y ago
In the bad old days of early web development, browsers that didn't understand the script tag would display your code in the document. They allowed html comments inside the script tag as a workaround for it. We always had to write <script><!-- //--></script>
http://javascript.crockford.com/script.html http://javascript.crockford.com/script.html
- sjs 16y agoAh, I had seen that written with //<!-- to open the comment and always wondered why people would settle for old browsers displaying // in the script tag, looks like it wasn't required and was just bad code written by people who didn't know what they were doing. So it goes. :)