get_user_agent {shinybrowser} | R Documentation |
This function exposes the user agent that is reported by the browser, but it
should only be used for troubleshooting purposes.
The value is reactive, therefore it must be accessed inside a reactive context
(such as an observe or reactive).
{shinybrowser} must be initialized with a call to detect()
in the app's ui.
get_user_agent()
User's user-agent string
if (interactive()) {
library(shiny)
ui <- fluidPage(
shinybrowser::detect(),
"Your user agent:",
textOutput("ua_info")
)
server <- function(input, output, session) {
output$ua_info <- renderText({
shinybrowser::get_user_agent()
})
}
shinyApp(ui, server)
}