-
Notifications
You must be signed in to change notification settings - Fork 621
Turbolinks double loading pages #403
Comments
Turbolinks 5.2.0 is causing all the links on a Rails 5.2.1 site to fire twice. To debug this, we removed all javascript from the source, then jquery, then rails-ujs, then bootstrap, and so on. We tried adding 'data-no-turbolinks' to the link_to tags and then to the body tag. We tried rolling back versions of Turbolinks to 5.1 and 5.0 to no avail. Nothing fixed this except to remove Turbolinks entirely which is where we stand right now. |
Follow up on my previous comment. Our problem was solved by changing 'data-turbolinks-track' => 'reload' in the stylesheet_include_tag and javascript_incude_tag to 'data-turbolinks-track' => 'false'. Links are firing only once and Turbolinks is back in the project. |
I have tried to follow @ccasabona but I discovered that now I am running the problem of not having |
Hi @rickapichairuk! Thanks for your detailed description, and glad to hear that you've been inspired to give Turbolinks a go :) Full reloads occur when tracked assets in the Sometimes this can be caused by third-party libraries like the Google Maps API. This case has been discussed here (with possible solutions): #165 Hope that helps. |
I might be late on this topic, but what did the trick for me was to add the below in the |
@Tcheetox that is good since it worked for you. Did you check that all the JS compiles before the reload action? |
It has been so long since I looked at this that I forget everything I tried, but I think I did use the meta tag:
<meta name="turbolinks-cache-control" content="no-cache”>
My notes are that turbo links does not work with content security policy. If I remove the CSP, then the double loading of pages stops. We decided that CSP was more important.
Frankly, I quit using turbo links so long ago that I don’t miss it.
… On Nov 17, 2020, at 2:27 PM, Awokoya Emmanuel ***@***.***> wrote:
@Tcheetox <https://github.com/Tcheetox> that is good since it worked for you. Did you check that all the JS compiles before the reload action?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#403 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABQTUITTQMGCURVHBJLDUA3SQLFBLANCNFSM4FLQC4OQ>.
|
Hello!
After watching the Turbolinks 5: I Can’t Believe It’s Not Native! by Sam Stephenson talk, I was so inspired that I am trying to build a hybrid app using turbolinks!
I am using Rails, Turbolinks and Vue.js and eventually plan to use turbolinks-ios and turbolinks-android to build hybrid apps on top of the rails/turbolinks/vue.js app.
I am using the following software and versions:
Right now I have an issue where turbolinks keeps on making double requests.
On one of the pages, we have a Google Maps modal which allows the user to select their location and then redirects to another page via Vue.js (using
Turbolinks.visit(url)
and the following is logged to Google Chrome's developer tools Network view:After that, requests for
favicon.ico
and other product related images are made. And after the page seems to have been "loaded", another request is made toGET products
again except this time it seems to be areload
:This does not seem like the expected behavior. I would expect that only one request is made and that the head section is merged and the new body is rendered.
What would cause
turbolinks
to do areload
?The text was updated successfully, but these errors were encountered: