Custom tab icon

Completed

Comments

3 comments

  • Avatar
    Mark Williams

    It would be really useful to be able to change the favicon as this distinguishes the page from others.

     

    Is there an option to do this with javascript?

    0
    Comment actions Permalink
  • Avatar
    John Price

    Its sort of possible in Javascript.. Doesn't seem to work in Internet Explorer or Safari though. You might want to experiment.

     

    (function() {
        var link = document.createElement('link');
        link.type = 'image/x-icon';
        link.rel = 'shortcut icon';
        link.href = 'http://www.siteicontouse.com/favicon.ico';
        document.getElementsByTagName('head')[0].appendChild(link);
    }());
    0
    Comment actions Permalink
  • Avatar
    Daniel Beardwell

    I've had to upload my icon to a "Favicon Hosting and Icon Generator" site for the javascript to pickup the .ico, but that bit of Javascript seems to have done the trick nicely :-) 

    Many thanks John,
    Daniel 

    0
    Comment actions Permalink

Please sign in to leave a comment.