'Use a different favicon based on a percentage chance
I want to have a Website, that displays the normal Favicon in most of the time but sometimes (In a rare case) I want it to show a different Favicon. Let's say we have a 10% Chance. Then it should display the second Favicon once in 10 Page refreshes. Right now I just have the Favicon1.ico and Favicon2.ico. Right now I'm only able to use 1. <link rel="icon" type="image/png" href="..\images\favicon.ico" sizes="32x32" />. I assume that with JavaScript I could do something like that but I couldn't find an answer.
Solution 1:[1]
Hi in the following link the subject of being able to change the favicon in a dynamic way is covered, it can serve as a guide, you will only need to create a function so that you assign the behavior you want, Greetings
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Carlos Alberto Lozada Torcatt |
