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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:05:04+00:00 2026-05-20T13:05:04+00:00

This is more of a best practice question. I recently began using the HTML5

  • 0

This is more of a best practice question.

I recently began using the HTML5 boilerplate for a bunch of projects I have been doing but recently discovered something that could be an issue. Another developer brought to my attention that it may be an issue loading JS files at the bottom of the document due to certain functionality not working on page load( ie. form using jQuery $.ajax) and in turn presenting some usability issues. I wanted to get some opinions on what is the best way to address common issues like this that may arise. I have been using HTML5 boilerplate as I know Paul Irish and friends have really thought out this system and are constantly improving upon it.

Example issue: Home page of site has newsletter sign up form that uses the jQuery $.post function to submit values of form. User has access to enter values and press submit but this will render no action as js is not loaded presenting usability issues.

What is the best way to work with JS included at the bottom of the site?

  • 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-20T13:05:05+00:00Added an answer on May 20, 2026 at 1:05 pm

    My recommendation would be this:

    • put all your SCRIPT elements at the bottom of the page
    • let the jQuery script be in the first SCRIPT element
    • let the second SCRIPT element contain a ready() handler for the behavior that you want to become available as soon as possible

    Like so:

    <script src="http://ajax.googleapis.com/.../jquery.min.js"></script>  
    <script>
        $(function() {
            // bind the handler to the newsletter submit button
            // etc.
        });
    </script>
    <!-- all other external and inline scripts should be below this line -->
    <script src="pluginA.js"></script>
    <script src="pluginB.js"></script>
    <script>
        $(function() {
            // other page load code
        });
    </script>
    

    This is the best you can do.

    Btw, users expect the page to be broken for the first couple of seconds anyway. I experience this all the time on Facebook, Youtube, …

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

Sidebar

Related Questions

I'm struggling with how best to combine javascript Classes and jQuery plugins. This question
There have been several questions that have answered the HOW or more precisely how
Is there a best practice, algorithm or software (open source with a permissive license
Which of the following is best practice in Objective-C? UITableView* view = (UITableView*) [self
all. I've been thinking about a design decision for a PHP form and I'd
My colleague and I are having a tough time deciding on a best practices
I have some sections on my web site where only logged in users can
I am just starting out with backbone and am trying to set up a
Occasionaly I find that I need a generic pass through-interface. For example for mix-in
The repository pattern seems to work well when working with an initial project with

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.