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 8544671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:37:00+00:00 2026-06-11T12:37:00+00:00

In certain circles best practices suggest registering JavaScript files (js) at the end of

  • 0

In certain circles best practices suggest registering JavaScript files (js) at the end of a document to allow the DOM to completely load before invoking the js. This makes total sense but the question I have is if you are working with an asp.net webform and due to the postbacks I need to register the js files with the scriptmanager

<asp:ScriptManager ID="ScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/js/jquery-1.7.js" />
            <asp:ScriptReference Path="~/js/jquery.simplemodal-1.4.2.js" />
</Scripts>
</asp:ScriptManager>

Since the script manager has to be at the top of the document before any ajax features can be invoked it seems as if I am stuck registering the .js files at the beginning of the document.
Is this correct and are there other alternatives to registering the files at the bottom of the page to help boost page performance (aside from minifying the scripts. The above example is just a sample and not production code). Moving the js files outside of the script manager results in the pages loosing reference to the js file after the initial postback.

Cheers

  • 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-11T12:37:01+00:00Added an answer on June 11, 2026 at 12:37 pm

    I am not hugely familiar with the script manager class and why one needs to use it, but there is a property on the script manager called loadscriptsbeforeui that is set to true by default. Also, as for best practices, these should probably pulled from a cdn where they are much more likely to be cached and are not as high of risk as custom js files when loading before the UI.

    All of that said, I am not sure why you can’t just drop the script manager and load them yourself with markup at the bottom. As long as the ajax code is loaded / run afterwards.

    Perhaps I am missing some of your constraints though?

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

Sidebar

Related Questions

I was just wondering why certain website don't allow anything other than letter and
Certain list comprehensions don't work properly when I embed IPython 0.10 as per the
In certain types of code (e.g. simulation/ games/ optimization), many physical quantities/properties are stored,
In certain text editors, like E, I can select multiple locations and, as I
In certain areas of development such as game development, real time systems, etc., it
After certain R#-recommended edits R# colors the background of blocks of code in a
Under certain circumstances, I wish to display an error message to the user if
I certain html page contains links that are displayed with each onclick event. I
On certain error cases ATL invokes AtlThrow() which is implemented as ATL::AtlThrowImpl() which in
In certain cases - especially when an exception escapes a destructor during stack unwinding

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.