Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is the best place to load JS in html

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 239
    Comment on it

    Hello Reader's!, If you need to know which is the best place for putting the JS. You can put the js functions in the head part. But it'll be a good habit to put all of your functions in a separate file. You can also call for the external script reference in tag. If you put all of your JS file in the top of your page, It'll looks good but not efficient for project.
    So the for linking the JS files and scripts is at the bottom of the HTML page, Or you can put it after the closing of body tag. By doing this the download elements will be download first and get completed before the script run and load

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: