question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

urlSync + Turbolinks back button not working

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:17 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
bobylitocommented, Jun 8, 2018
1reaction
bobylitocommented, May 15, 2018

Also, it would be great to have at least a few lines of documentation about this turbolinks options. It seems to be black magic 😄

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 😅

But turbolinks=true appears in the URL query string when I do that. Can I hide it?

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found