Ask A Question

Notifications

You’re not receiving notifications from this thread.

Rails for Beginners Part 7: Adding Bootstrap CSS & Javascript Discussion

Would it make more sense to add the Bootstrap javascript bundle just before the closing body tag so the page loads faster and does not block the rendering of the page? Also, once a person visits the site, are the files cached so they do not need to re-download all the time? (Assuming the Bootstrap files have not changed)

Reply

going to try this, I need to put the bootstrap at the end of application layout html file.

Reply

You can add 'defer' attribute on the script tag.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,842+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.