Forum Moderators: open

Message Too Old, No Replies

Can be link outside head?

         

toplisek

5:22 am on May 12, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As we know there is javascript file inside <head>

Can I put also under <head> </head> inside BODY section?

<script type="text/javascript" src="javascript/#*$!.js"></script>

ProbablyMike

10:16 am on May 12, 2011 (gmt 0)

10+ Year Member



Yes, no problem, if fact some sites recommend to but them just above </body>

Fotiman

12:50 pm on May 12, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The best place for scripts is just before the closing </body> tag. The reason that's the best place is because browsers will only download and execute scripts synchronously, 1 script at a time. So if the script is in your head, other page elements will not load until after the script has completed, and may give the appearance of a less responsive UI.