Favicon displays locally but not on shinyapps.io

518 views
Skip to first unread message

Greg Kapoustin

unread,
Jul 1, 2015, 9:06:55 AM7/1/15
to shinyap...@googlegroups.com
I placed favicon.ico into the www folder. The icon displays correctly when I open the app in a local browser, but does not display when the app is deployed to shinyapps.io. The code is:

shinyUI(
  fluidPage(
    tags$head(
      tags$link(rel = "shortcut icon", href = "Img.png"),
...

Most strangely, this code works for applications deployed about a week ago. This seems like a recent regression.

Is there a new/different method for using favoicons and other resources when deploying to shinyapps.io?

Thank you

Andy Kipp

unread,
Jul 1, 2015, 9:45:50 AM7/1/15
to Greg Kapoustin, shinyap...@googlegroups.com
Greg,

This is fallout from a change we made a few weeks ago where applications are now hosted inside an iframe. The purpose of this change was to support custom domains (as well as lay the ground work for some future changes we would like to build).

I am afraid that with this change the domain for your application (account.shinyapps.io/app) is not actually your application, rather its a dynamic page that serves an iframe that embeds your application. Your application is now served from a URL (internal.shinyapps.io/account/app). I am not sure if any workaround exists right now that will enable the use of favicons, but it is something we can look at addressing in a future release.

I am sorry, and I wish I had better news.
-Andy

--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/e426d291-e59b-4aaf-ac95-54ddcb62d94b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Greg Kapoustin

unread,
Jul 1, 2015, 1:25:12 PM7/1/15
to shinyap...@googlegroups.com, gr...@alphabetaworks.com
Appreciate the explanation.

I tried loading the application directly (internal.shinyapps.io/account/app) and the favicon did indeed show up.

Would the following work-around/fix be viable: It looks like the favicon lives in https://internal.shinyapps.io/account/app/base_href/Img.png and https://internal.shinyapps.io/account/app/Img.png. You know this URL as the time the dynamic page that serves the iframe (the container page) is generated -- it's saved as "var shinyapp_url" in the <head> of the container. Given this, couldn't you set shinyapp_url/favicon.ico as favicon for the container page? In other words, is there a straightforward way to check for favicon for the embedded page and, if present, set it for the container page?

Thanks for assistance,
Greg

Scott Kallgren

unread,
Feb 14, 2016, 4:15:39 PM2/14/16
to ShinyApps Users, gr...@alphabetaworks.com
Just checking -- any updates on this? I'd like to put a favicon on my shinyapps.io app and have tried unsuccessfully multiple ways before coming across this.

Greg Kapoustin

unread,
Feb 14, 2016, 5:02:20 PM2/14/16
to ShinyApps Users, gr...@alphabetaworks.com
At least as far as our apps are concerned, the recent massaging of shinyapps.io configuration seems to have fixed this favicon issue. I just double-checked and favicons display properly both in Chrome and IE for our *.shinyapps.io/app URLs.

It is possible that you are experiencing a different issue.
Reply all
Reply to author
Forward
0 new messages