Bookmarking by saving the state to the server

In this method, the only modification in terms of coding is to change the enableBookmarking argument to the server. Let's recreate the square-calculation application using saving state to the server:

ui<-function(request){ 
  fluidPage( 
    textInput("inptxt","Enter Number"), 
    verbatimTextOutput("outsquare"), 
    bookmarkButton() 
   )  
  } 
server<- function(input,output,session){ 
  output$outsquare<- renderText({ 
    (as.numeric(input$inptxt)*as.numeric(input$inptxt)) 
  }) 
} 
shinyApp(ui,server,enableBookmarking="server") # saving to the server 

How does it make a difference in processing? Saving state to the server method saves the state of the application on the server instead of embedding the states into a URL. Shiny ...

Get Web Application Development with R Using Shiny - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.