Quote Originally Posted by frank18 View Post
Interesting that document.write is still used in the latest ZC 1.5.5e in includes/templates/template_default/common/html_header.php, around lines 123-124

Code:
<script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="//code.jquery.com/jquery-1.12.0.min.js"%3E%3C/script%3E'));</script> 
<script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript type="text/javascript" src="<?php echo $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'); ?>/jquery.min.js"%3E%3C/script%3E'));</script>
but a Google search for "alternative to document.write" returns umpteen documents stating that document.write is an outdated and even bad way to use it.
Yes. It was still somewhat in vogue when that template was initially created. Are you suggesting it should be ripped out during a "point release" and not wait for a "major version release"?

Keep in mind that the majority of people who have contributed templates or who google for help with pretty much any javascript-driven stuff are gonna find or use outdated methods ... and most won't have a clue how to use many of the so-called "better" methods.

Furthermore, you do realize that the code you're referring to is ONLY a catch-all in case the CORRECT loading of jquery hasn't already happened earlier. Those two script lines should NEVER trigger anything if the template is working as designed out of the box