URL Sync without Vue Router

Hi, I am using Vue InstantSearch without Vue Router. Is there any way I can have url sync for the refinement lists, search etc? The documentation only describes the process with Vue Router so I am not sure if it can be done

Hey @chrys,

I have one “hacky” solution in mind, but first I’d like to better understand what you expect to achieve with this feature.

So the question is simple, why do you want to have URL sync?
What shape do you want the URL to have? Does it matter?

Thanks,

Hi @rayrutjes,

I basically want to specify in the url a refinement list attribute and its value (e.g. ?category=Computers) and have the value automatically selected in the refinement list.

My use case: I have many products, many of them are Phones. Each phone-product has an attribute with the name of the Phone name, so in case the product is “Apple iPhone 7 Plus red 64gb DISCOUNT OFFER” its phone_name field will be “Apple iPhone 7 Plus”. I 'd like to be able to link to a specific phone by filtering based on that field. so ?phone=Apple+iPhone+7+Plus will preselect the specific refinement list value.

I’m open to try anything that may work.

I’m hoping this can be done too. I’m looking to do something similar (albeit with React) so that people can share links to the results, and so refinements will persist when going back and forward in the browser history.