Changing website favicon dynamically

前端 未结 15 1311
温柔的废话
温柔的废话 2020-11-22 02:17

I have a web application that\'s branded according to the user that\'s currently logged in. I\'d like to change the favicon of the page to be the logo of the private label,

15条回答
  •  不思量自难忘°
    2020-11-22 02:44

    I use favico.js in my projects.

    It allows to change the favicon to a range of predefined shapes and also custom ones.

    Internally it uses canvas for rendering and base64 data URL for icon encoding.

    The library also has nice features: icon badges and animations; purportedly, you can even stream the webcam video into the icon :)

提交回复
热议问题