get_user_agent {shinybrowser} | R Documentation |
Get user agent string from the browser
Description
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.
Usage
get_user_agent()
Value
User's user-agent string
See Also
Examples
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)
}
[Package shinybrowser version 1.0.0 Index]