Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8649217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:30:23+00:00 2026-06-12T13:30:23+00:00

Possible Duplicate: Is it practically good to put JS files at the bottom of

  • 0

Possible Duplicate:
Is it practically good to put JS files at the bottom of webpage?

I’ve seen HTML documents where the developers place the <script src="xxx"> tags in the bottom of the document and is wondering why.

I’ve just read HTML4 specification regarding the script tag. It says nothing about when and how the script should be loaded. Hence it’s up to the web browser to handle that as it sees fit.

Isn’t it reasonable to think that the browser authors should be aware of that loading scripts synchronously or in any other way hinder the document rendering would affect the browsing experience?

i.e. aren’t we as web developers better off to put the scripts in the <head> tag?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:30:24+00:00Added an answer on June 12, 2026 at 1:30 pm

    Scripts require interpretation (which can be comparatively expensive) and may optionally require retrieval via another HTTP request. Placing them at the end of the document allows the rest of the page to load first.

    Scripts without async or defer attributes are fetched and executed
    immediately, before the browser continues to parse the page.

    https://developer.mozilla.org/en-US/docs/HTML/Element/script

    See also http://dev.w3.org/html5/spec/the-script-element.html, specifically the areas around preparation/blocking which are covered in detail. Note that this is an editor’s draft in flux; some of these rules may not be in the final specification or be enforced by all user agents.

    As a side note, this blocking behavior is not bad/wrong. Think of a library like Modernizr, which does belong in the head. It alters the DOM in a way that allows CSS to be correctly applied; were it executed in parallel, the results would be incorrect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: C: Where is union practically used? I know the concept of union
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
Possible Duplicate: Python urllib2 Progress Hook I have a script which uploads a file
Possible Duplicate: Javascript closure inside loops - simple practical example Seen many posts talking
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP
Possible Duplicate: && operator in Javascript In the sample code of the ExtJS web
Possible Duplicate: How can I convert a list<> to a multi-dimensional array? I want
Possible Duplicate: How to do the vector of sets in C++? I want to
Possible Duplicate: How can I understand nested ?: operators in PHP? Why does this:
Possible Duplicate: Can main function call itself in C++? I found this problem very

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.