I saw this in several parts of the code, and I didn’t want to “assume” that it didn’t matter, but this is a copy of the Google Analytics code:
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-xxxxxx"); pageTracker._trackPageview(); } catch(err) {} </script>
You will notice that there are two open / close script tags. Is there any reason why encapsulating code bits in two different script tags is useful? My first reaction would be to simply remove the redundancy.
source share