You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Where do I edit the information so that the css comes BEFORE the js in the header?
<script type="text/javascript" src="media/jquery/jquery.min.js"></script> <script type="text/javascript" src="media/jquery/jquery.easing.min.js"></script> <script type="text/javascript" src="media/jquery/jquery.mousewheel.min.js"></script> <script type="text/javascript" src="media/fancybox/jquery.fancybox.min.js"></script> <link rel="stylesheet" type="text/css" media="all" href="media/fancybox/jquery.fancybox.css" /> <style type="text/css" media="all">#fancybox-close {display: block;}</style>
should be
<link rel="stylesheet" type="text/css" media="all" href="media/fancybox/jquery.fancybox.css" /> <style type="text/css" media="all">#fancybox-close {display: block;}</style> <script type="text/javascript" src="media/jquery/jquery.min.js"></script> <script type="text/javascript" src="media/jquery/jquery.easing.min.js"></script> <script type="text/javascript" src="media/jquery/jquery.mousewheel.min.js"></script> <script type="text/javascript" src="media/fancybox/jquery.fancybox.min.js"></script>
Offline
Why do you believe it needs to be changed? It will make no difference in how the page is rendered.
Offline
Because a client is fixated on Yslow and THAT is telling him it needs to be done.
Offline
This is done for efficiency - aka page load time for SEO.
If the css is loaded BEFORE the js, the js then has the css to work with while the page continues to load.
Of course, the css that the js uses should load first, but it is good practice to load all css in case someday a js uses another css.
Last edited by Blitzen (09-12-2012 11:22:52)
Offline