I often have way too many Jupyter notebook tabs open and I have to distinguish them from the first couple letters of the notebook in front of the Jupyter organge book icon. What if we could change the icons to visually distinguish different notebooks?
I thought I found a really easy way to set the icon in Jupyter notebooks... but it works in Firefox and not Chrome. I'll go through the easy solution works in more browsers and the hard solution.
More Robust Solution: Changing in Developer Console
This works in at least Chrome and Firefox, but doesn't seem to work with Edge.
document.querySelector("link[rel*='icon']").href = "favicon.ico";
The site favicon.cc has a list of top rated favicons and it often has base64 encoded versions you can paste straight in without downloading the image, just replace the file with that image string. For example to get this palm tree you can run:
Easy way: Doesn't work in all browsers
I found in Firefox that I could change the favicon just by putting this into a cell:
%%html <link rel="icon" type="image/png" href="/path/to/icon.ico">
Again the reference can be a base64 encoded image as above. Another way to run this without magic cells is:
from IPython.display import HTML, display display(HTML('<link rel="icon" type="image/png" href="/path/to/icon.ico">'))
For R you have to use the relevent