get_user_agent | 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
detect()
, get_all_info()
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.