I have been trying to hide title and link tag using internal css, but it is not working.
<link rel="shortcut icon" href="./favicon.png">
<title>app · Streamlit</title>
I wanted to hide these two using css or js, Any solution?
CodePudding user response:
CSS cannot touch the browser chrome. It can't change the favicon or title in the address bar / browser tab / window title bar.
It can only affect the document in the viewport.
CodePudding user response:
There is nothing that you can do with CSS.
<title>app · Streamlit</title>
This is how you could set an empty text:
document.querySelector('title').innerHTML = '';
Or you could also remove that tag:
document.querySelector('title').remove();
<link rel="shortcut icon" href="./favicon.png">
Removing the value ./favicon.png
will not help, so you will need to set an empty icon:
document.querySelector('link[rel~="shortcut"]').setAttribute('href', 'data:image/x-icon');