Keep shiny app running in shiny server (no greying out)

I believe that would keep the app thinking, but I believe you're losing the websocket connection between the app and the browser.

Mixed with your app_idle_timeout and the app below, I believe it should not quit.

ui <- fluidPage(
  "Am I losing connection?",
  tags$div(style = "position: absolute; top: -100px;",
    textOutput("clock")
  )
)
server <- function(input, output) {
  output$clock <- renderText({
    invalidateLater(5000)
    Sys.time()
  })
}
shinyApp(ui = ui, server = server)

The clock above will update every 5 seconds to a value that is above the window. This css prevents users from seeing the value, but since something is sent every 5 seconds, the websocket is kept alive.

Does this app show the timeout for you?

1 Like