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

  • SEARCH
  • Home
  • 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 6999289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:31:19+00:00 2026-05-27T20:31:19+00:00

According to http://caniuse.com/script-defer , most browsers support the script tag’s defer attribute. I would

  • 0

According to http://caniuse.com/script-defer, most browsers support the script tag’s defer attribute.

I would like to know if scripts specified by <script defer src="..."> get executed before or after jQuery’s $(document).ready()? Are the major, modern browsers (Chrome, Firefox, IE, etc.) consistent in the order of execution or does it vary?

  • 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-05-27T20:31:19+00:00Added an answer on May 27, 2026 at 8:31 pm

    Based on this fiddle I have to say jQuery’s $(document).ready() executes after a script declared with defer. I tested it with Firefox and Chrome, and both had the same behavior independently of the sequence of the scripts.

    I guess behavior on other browsers might change based on their implementation, so it’s always uncertain.

    EDIT: As it turns out, the defer attribute should be used with an external javascript file. I edited the fiddle to show this, apparently with the same results.

    Updated fiddle here: http://jsfiddle.net/RNEZH/15/

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

Sidebar

Related Questions

According to http://support.microsoft.com/kb/288902/en-us You can attach to a specific instance if you know the
According to http://developers.facebook.com/docs/reference/plugins/like/ I change the open graph tag to <meta property=og:site_name content=abcdefg1234> from
I have a question regarding a window style hexadecimal. According to http://support.microsoft.com/kb/111011/en-us , 0x16CF0000
According to: http://developer.android.com/sdk/android-2.0-highlights.html Android 2.0 should support the HTML5 video element. I haven't been
According to : http://msdn.microsoft.com/en-us/library/ms175061.aspx It says that the NOT LIKE relational operator : Specifies
According to http://docs.jquery.com/Plugins/Validation the form tag is necessary in order to do validation. In
According to http://www.faqs.org/docs/diveintopython/fileinfo_private.html : Like most languages, Python has the concept of private elements:
I happened to use the below CSS hack for WebKit-based browsers, according to http://www.webmonkey.com/2010/02/browser-specific_css_hacks/
According to http://msdn.microsoft.com/en-us/library/aa916070.aspx (DnsQuery_W), DNS query libraries are available on Windows Mobile / CE
According to http://jqueryui.com/demos/tabs , tabs that load content via AJAX will show Loading... while

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.