urlSync + Turbolinks back button not working
See original GitHub issueI am using the using instantsearch with turbolinks and am experiencing an issue where the back button is not working correctly.
My search coffeescript
search = instantsearch(
appId: 'id'
apiKey: 'key'
indexName: 'index'
urlSync: {
threshold: 300
})
When I search products, the url is updated as expected, search works. If I click on a product, than click the back
button, the url changes to the previously generated search url, but I stay on the product#show page for the instance I was viewing. Clicking back
button a second time takes me to the root /products page.
This issue doesn’t occur when setting useHash: true
, unfortunately analytics team needs this to be query params.
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (15 by maintainers)
Top Results From Across the Web
Turbolinks, Rails, back button, footer from other source
When I click a 'back' button in browser there is one more footer appends. In application.html.slim : doctype html html head title -...
Read more >Turbolinks, browser back and duplicate plugins
After upgrading to Turbolinks 5 we started seeing duplicate plugins when pressing the browser back button.
Read more >Stimulus, Turbolinks and Caching - Hotwire Discussion
Hi all, I'm trying to figure out how to best handle Turbolinks caching ... When I press the back button, Turbolinks doesn't make...
Read more >Rails, turbolinks and javascript. How to avoid ... - GoRails
I'm implementing Switchery button in my Rails app and Turbolinks is on. When I navigate to another page, and then click the back...
Read more >Untitled
Land effects bend, Sample error example, Mr 500 sat telekom, Sungkoro, ... Camel bone for sale, Xmlreadmemory base url. Sync images from ipad...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing this issue in favor of https://github.com/algolia/instantsearch.js/issues/2998
Yes totally, especially since it was an option of the urlSync. From what I can read about turbolinks, the project is very much black magic 😅
I’m not quite sure how turbolinks works in practice. I don’t know if you store the attribute in the history data would it still work. Could you try to remove the turboLinks attribute from the URL using a custom createURL function https://community.algolia.com/instantsearch.js/v2/guides/routing.html#historyopts?