I'm trying to implement infinite scroll. But with Turbolink gem I have to refresh the page or it doesn't work.
Which are negative side disabling turbolink? There are any reduction of performance?
Removing turbolinks
has advantages and disadvantages.
One advantage is that it makes page loads faster for modern browsers. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces only the body (or parts of) and the title in the head.
However, there are many things that can go wrong when you're working with turbolinks
. The more Javascript you add to your app, the more potential there is for conflict and bugs. The first thing I do (and many other Rails developers that I know) when setting up a new Rails app is:
gem 'turbolinks'
from your Gemfile
turbolinks
from app/assets/javascripts/applicaiton.js
"data-no-turbolink"
to the <body>
tag in app/views/application.html.erb
If you want to go down the route of conditionally disabling turbolinks
on a page-by-page basis you can check out this post: Rails 4: disable Turbolinks in a specific page