Search code examples
rubyruby-on-rails-4herokuassets

How to return to home page and load assets using the browser's "previous" button


I recently deployed my Rails 4 web application on Heroku.

I am facing an Assets issue: When I go to the homepage or click a link to go to another page, everything is ok, and all the required CSS and JS files load. The problem is when I click on the “previous page” of the browser to return to the home page, the Assets do not load anymore, and the assets of the second page will be applied to the home page.

I put the CSS and the JS files in the Public folder, and made a link in every page using:

<link rel="stylesheet" href="/style.css">

<script src="/tablesaw.js"></script>

What am I missing?


Solution

  • Edit, in fact it was a Turbolinks issue, resolved, many thanks