Skip to content

Instantly share code, notes, and snippets.

Created November 6, 2017 06:57
What would you like to do?
Dynamic favicon using javascript
(function() {
var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'shortcut icon';
link.href = '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment