Skip to main content

Does <script><!--//--></script> have a modern purpose?


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>


Source: Tips4allCCNA FINAL EXAM

Comments

  1. 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

    ReplyDelete

Post a Comment

Popular posts from this blog

Wildcards in a hosts file

I want to setup my local development machine so that any requests for *.local are redirected to localhost . The idea is that as I develop multiple sites, I can just add vhosts to Apache called site1.local , site2.local etc, and have them all resolve to localhost , while Apache serves a different site accordingly.