Login | Register | FAQ
Anonymous

What is the best order of scripts on page ?

+ Post a reply

2 posts Page 1 of 1


What is the best order of scripts on page ?

by nepalithito » Mon Dec 30, 2013 2:00 pm

I have been using different Jquery scripts in my site and what can be the best order of putting script links in the template. Current example in my site is as follows.
Code: Select all

Code: Select all
<link rel="stylesheet" type="text/css" href="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/custom.css" />



<script src="sohoadmin/client_files/site_javascript.php" type="text/javascript"></script>
<script type="text/javascript" src="sohoadmin/client_files/embed.js"></script>




<script type="text/javascript"></script>
<meta content="text/html; charset=us-ascii" http-equiv="Content-Type" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="custom.css" />
<link type="text/css" rel="stylesheet" href="../../../../../../../../../../../../../../tooltip/themes/2/tooltip.css" />
<link href="lightbox/css/lightbox.css" rel="stylesheet" />
<link href="../../../../../../../thumbslider/themes/3/slider.css" rel="stylesheet" type="text/css" />
<link href="jsimgslider/themes/8/js-image-slider.css" rel="stylesheet" type="text/css" />
<link href="jsimgslider/themes/8/tooltip.css" rel="stylesheet" type="text/css" />
    <script src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/jsimgslider/themes/8/tooltip.js" type="text/javascript"></script>
    <link href="jsimgslider/generic.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/../../../../../../../../../../../../../../tooltip/themes/2/tooltip.js"></script>
<script> type="text/javascript" src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/jsimgslider/themes/8/js-image-slider.js"></script>
<script type="text/javascript" src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/lightbox/js/lightbox-2.6.min.js"></script>
<script src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/lightbox/js/modernizr.custom.js"></script>
<script src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/../../../../../../../thumbslider/themes/3/thumbnail-slider.js" type="text/javascript"></script>
<script language="JavaScript" src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/motionpack.js"></script>
<script type="text/javascript" src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/lightbox/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/../../../../../../../sohoadmin/plugins/MegaMenuBuilder/javascripts/jquery-1.10.2.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
<script type="text/javascript">var switchTo5x=true;</script>
<script src= "//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<link href="mactabs/mctabs.css" rel="stylesheet" type="text/css" />
<script src="sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/mactabs/jquery-tabs.js" type="text/javascript"></script>
<script>
    $.noConflict();
</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "8d9c62fc-ffd0-4818-97c0-293378a2141e", doNotHash: false,

doNotCopy: false, hashAddressBar: true});</script><!--[if IE]>
<style type="text/css">
img { behavior: url(&quot;http://www.egtours.com/sohoadmin/program/modules/site_templates/pages/PHASE2-Dinkin_Flicka-Evergreen/pngbehavior.htc&quot;); }</style><![endif]-->
</head>
User avatar

nepalithito

  • Posts: 95
  • Joined: Thu Mar 01, 2012 10:10 am

Re: What is the best order of scripts on page ?

by XainPro » Tue Dec 31, 2013 5:46 pm

you are using jquery more then one i mean you are including jquery 3 times the order should be
on top of all scripts add jquery and add all scripts below jquery main code
User avatar

XainPro

  • Posts: 3933
  • Joined: Fri Feb 17, 2012 8:10 pm


+ Post a reply

Page 1 of 1

cron