DEV Community


Discussion on: Adding a dynamic favicon with users scroll percentage

belinde profile image
Franco Traversaro

probably you should change changeFavicon() to not append a favicon every time, but replacing the old one instead. Appending only is a form of memory leak, because the DOM will increase indfinitely when the user scrolls up and down

styxofdynamite profile image
Luke Author

Thanks I'll look into that when I get a chance and update accordingly.

Forem Open with the Forem app