add HTML meta tag in the head section

434 views
Skip to first unread message

Jui-Hua Hsieh

unread,
Jun 3, 2015, 4:18:21 PM6/3/15
to shiny-...@googlegroups.com
Hi, 

I am trying to add these into HTML head section in the ui.R

tags$meta(`http-equiv`="pragma", content="no-cache")    # <meta http-equiv="pragma"          content="no-cache">
tags$meta(`http-equiv`="Cache-control", content="no-cache") # <meta http-equiv="Cache-control" content="no-cache">
tags$meta(`http-equiv`="Cache-control", content="no-store")  #<meta http-equiv="Cache-control" content="no-store">

I wonder where I should place the code in order to let the HTML meta tags appear between <head> </head>

Thank you!

Jui-Hua

###### The snippet of code
shinyUI(
  
  pageWithSidebar(
  
  # Application title
  headerPanel("XXX"),
  
  sidebarPanel(

 )
)

Dean Attali

unread,
Jun 3, 2015, 6:04:41 PM6/3/15
to shiny-...@googlegroups.com
I might be wrong so maybe Joe Cheng or someone else will correct me, but I'm pretty sure that any code placed inside a `tags$head()` will appear inside the <head> tag.  So just make a call to tags$head(tags$meta(...), tags$meta(...), tags$meta(...)). The exact location doesn't matter as far as I understand because it will know to go inside <head>

Joe Cheng

unread,
Jun 3, 2015, 6:08:57 PM6/3/15
to Dean Attali, shiny-...@googlegroups.com
Dean's right. Also you don't want two separate tags for Cache-control, just one with comma-separated values (e.g. "no-cache, no-store").

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/6c1716e3-f466-4b6f-93cd-a3bb01574fb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages