1

I have a number of individuals who log into a shiny-server application where they all interact. After the app stops, I load another application, they each click ``reload'', and they all interact on the new application.

If someone clicks ``reload'' early, then everyone needs to re sign in. Is there any way to avoid this. I'd like to just regenerate shiny's default reload-page.

Jordan
  • 455
  • 6
  • 21

1 Answers1

1

I'm not sure how your reaload works as you havent posted any code, however you can force F5 page refresh like so. parts of the code example are taken from here`

library(shiny)
library(shinyjs)

jscode <- "shinyjs.reload = function() { window.location.reload(true); }"

ui <- fluidPage(
  useShinyjs(),
  extendShinyjs(text = jscode),
  textInput("text", "Text"),
  actionButton("reload", "Refresh app")
)

server <- function(input, output, session) {
  observeEvent(input$reload, {
    js$reload();
  })
}

shinyApp(ui = ui, server = server)
Pork Chop
  • 28,528
  • 5
  • 63
  • 77