Dynamic favicon #4188
astariul
started this conversation in
Ideas / Feature Requests
Dynamic favicon
#4188
Replies: 1 comment
-
Hi @astariul, You can overwrite the favicon with a line of custom HTML: ui.add_head_html('<link href="/static/your-favicon.ico" rel="shortcut icon" />') Note that it doesn't seem to be possible to overwrite ICOs with PNGs, at least in some browsers. But setting the default to some invalid value like @ui.page('/test', favicon=' ') seems to help in such cases. Allowing to dynamically change the favicon like changing the title with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I've seen in the docs how to add a custom favicon : either via
ui.run()
or in theui.page()
decorator with thefavicon
argument.But this is static. In my case, I have a page with a path parameter, like so :
I want to display a different favicon depending on the
item_id
(just like I can change the tab title dynamically).How can I achieve this ?
Beta Was this translation helpful? Give feedback.
All reactions