Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript change favicon dynamicly

var link = document.querySelector("link[rel~='icon']");
if (!link) {
    link = document.createElement('link');
    link.rel = 'icon';
    document.getElementsByTagName('head')[0].appendChild(link);
}
link.href = 'https://stackoverflow.com/favicon.ico';
Comment

PREVIOUS NEXT
Code Example
Javascript :: OwlCarousel not working after build react js 
Javascript :: prisma.db yaml 
Javascript :: Priority Queue Element 
Javascript :: puppeteer click is not working 
Javascript :: how to create session cookie in node js 
Javascript :: move_uploaded_file equivalent in js 
Javascript :: jquery remove duplicates 
Javascript :: nested object 
Javascript :: deep copy array of objects javascript 
Javascript :: menu with dynamic submenu in javascript 
Javascript :: forming a magic sqare hackerank in javascript 
Javascript :: pageSize useEffect 
Javascript :: translate javascript to english 
Javascript :: @typescript-eslint/no-empty-function 
Javascript :: react export multiple components from index 
Javascript :: Timeout error when trying to use npx create-react-app 
Javascript :: jquery on mouseover and mouseout 
Javascript :: html5 javascript json vertical colom grap 
Javascript :: mongoose auto delete after time 
Javascript :: pass mltiple valuesthorugh context in react 
Javascript :: Examples of correct code for the { "typeof": true } option with global declaration: 
Javascript :: How to append variable with anchor element href link in Angularjs 
Javascript :: angularjs How to sort a specific value in a map 
Javascript :: I am getting an error "createSpyObj requires a non-empty array" with running unit tests, which were executed perfectly before 
Javascript :: how to send more than one array using response() json() in laravel 
Javascript :: typeorm-how-to-write-to-different-databases 
Javascript :: disconnect google colab runtime 
Javascript :: jquery event element in viewport 
Javascript :: online convert javascript to typescript 
Javascript :: convert json date to java date 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =