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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:20:54+00:00 2026-06-11T22:20:54+00:00

Railscast#369 explains how moving the javascript_include tag to the bottom of application.html.erb can shorten

  • 0

Railscast#369 explains how moving the javascript_include tag to the bottom of application.html.erb can shorten loading time, as it allows the page to load at the same time as the javascript.

From the simple example given, it seems like the javascript tag should ALWAYS be at the bottom of the page. However, the fact that the Rails default has it at the top implies (to me at least), that this may not always be true.

When would someone NOT move the javascript tag to the bottom of application.html.erb?

  • 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-11T22:20:55+00:00Added an answer on June 11, 2026 at 10:20 pm

    If you call any javascript prior to it loading then you may run into issues. As an example in a view (blah.html.erb) file you might have:

    <script>
        jquery('#element_id').append("<p>Error Message</p>");
    </script>
    

    Which would look for jQuery being loaded by the include tag. Not a good practice but sometimes occurs.

    Also, you may use a js view file (blah.js.erb) which would look for jQuery before it is loaded as well.

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

Sidebar

Related Questions

RailsCast #326 ActiveAttr explains how to create table-less models. How can one translate the
I'm going through the railscast no 73 ( http://railscasts.com/episodes/73-complex-forms-part-1 ), where Ryan Bates explains
We've all seen the brilliant complex forms railscast where Ryan Bates explains how to
I have followed the following railscast about adding pdfkit to an application, and I
Railscast 88 revised The coffeescript in this railscast specifies the IDs of the html
I've searched for railscast 198 updated to rails 3, I can find some snippets
Followed instructions on Railscast but can't get server to start. It states the following
I ran through railscast #37 and can't seem to even get my search form
I am following the Pagination with ajax railscast for my rails 3 application. Everything
I'm following Railscast 88 to create a dynamic dependent dropdown menu. http://railscasts.com/episodes/88-dynamic-select-menus I'm rendering

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.