Wednesday, December 1, 2021
Home Technology Programming Blinking Page Title with Javascript | Flashing HTML page title

Blinking Page Title with Javascript | Flashing HTML page title

Now this is a very old practice that was probably popular some 5 years ago. Blinking / flashing your page title. But the thing is that I had to use it yesterday for a chat page. Every time a new message arrives we wanted to catch the users attention. So thats where it helps.

Where can you see the Title text blinking?

  • If you have the page open your Title will blink. Either switch between two messages or One Blank and One Message switching.
  • if you have that page open in a tab the you will see some text blinking on the tab name.
  • If the window is minimised with the page in question as the active tab then you can see the text in the taskbar tab blinking.
  • If you are using windows 7 then you need to point to your browser icon on task bar to see the blinking happening.

Here is the code.


// functions to blink the title of the page with a message

function blinkmsg(message, count) {

    blinkingmsg(count, message, true);


function blinkingmsg(count, message, blink){



    } else {


        count-- // decrement the number of times left to blink


    if (count > 0) {

        blinkTimer = setTimeout("blinkingmsg("+count+", '"+message+"', "+!blink+")", 800);



function test()


setInterval('blinkmsg("drink.", 3)', 2000);


Now the above code will do three title flashes in 2000, miliseconds or 2 seconds. So you can do the calculation as per your needs. Do not bug the user too much. Thats not a good idea. Plus setTimeOut will use quite a bit a CPU time I suppose because of constant need to check and execute.

Use the Code well and let me know if anything is not upto your expectation.


Comments are closed.

Most Popular

Set Shipping Rules on Wix

We understand that working on wix control panel can be a little overwhelming to beginners. Despite having 12 years of experience in...

Abacus for Kids FAQs

What is Abacus? Abacus is a "counting frame" or a very old calculating device that helps us to do mathematical...

Organic Food and Its Importance for Our Health and Our Planet

Food constitutes one of the pillars of human survival, besides being a source of our energy. Over the years of evolution, food...

List of Organic Vegetables Price in Delhi from Organic Food Suppliers

After facing the pandemic and realizing the need to build strong immunity in our bodies, we today witness a strong push towards...


I have started a new project called the Indic Dictionary. This will cover popular household words in India and what they are called in various languages. Eventually, I will make this an easy to use app where where people can easily find something like “hing in English” or “Tea Tree Oil in Hindi” or “carrom seeds in Urdu”.