Shiny bookmarking the state in URL


#1

Hi Tobias & Team,

first of all, thanks again for ShinyProxy – a very happy end user here :slight_smile:

I have a question similar to Pass custom arguments to the Shiny app – but not only on passing data to Shiny via URL params, but also to update the URL of the app as per the bookmarking feature of Shiny: https://shiny.rstudio.com/articles/bookmarking-state.html

It seems that the URL of the app is always static (domain/app/foobar) despite setting in the app:

onBookmarked(function(url) { updateQueryString(url) })

Do you have any suggestions on how to enable bookmarking in apps behind ShinyProxy?

Thanks,
Gergely


#2

Hi @daroczig,

I suspect it isn’t working because ShinyProxy apps run inside an iframe. This imposes some different rules when a script tries to access the browser’s location bar.

That being said, ShinyProxy does support query strings: if you append a query string to the URL, this query string will get forwarded to the shiny app. E.g.

domain/app/foobar?arg=query_string

Regards,
Frederick