I recently inherited some web code and found that all Java Scripts are contained in HTML comment tags
For instance:
<script type="text/javascript" language="javascript">
As I understand it, this method prevented older, unsupported browsers from interpreting your Java Script. However, this is not something that I have ever been taught to do, and I wonder if this is not considered unnecessary now, or is it still a common practice? If so, why?
Update : thanks to kennebec for your advice to leave them what I did now, and thanks to Emmett as well: I will definitely leave them from future code I write!
source share