in Front End, SEO

How To Dynamically Change Browser Tab Content2 min read

As the internet matures, standing out from the noise online will continue to be a big task.

As a marketer, the answer to standing out in my opinion is to sweat the small stuff and grab attention. Something I stumbled on a while ago was a dynamic way to change a website’s browser tab content after users navigate away or open a new tab (open a new tab and you’ll see the tab for this site change 🤓).

I’m a sucker for a gimmick and have used this ever since. Lately i’ve seen this used in such a creative way with more and more adopters.

I bully my processor into a hot mess with a million tabs open pretty much every day. This isn’t abnormal, your customers will do this too. And if you think about it, they are likely comparing you with your competition while doing so. A gimmick can therefore go a long way if you ask me. It recently peeked Barry Schwartz’ interests:

title tag with tab in front vs title tag with tab in background – interesting and caught my eye

— Barry Schwartz (@rustybrick) September 3, 2019

How does the content change?

It’s a cheeky little script which looks at user ‘focus’ and updates the page title when users navigate away. Cool right? Here it is:


Copy this code and paste it inside the <footer> (where I have mine) or the <head> of your website globally or select web page. If you’re on WordPress, install this bad boy and paste it in. Make sure you wrap it around an opening <script> and closing </script> and of course change the message between the quotations to give it your own spin, or feel free to take mine.

You can use the same message across the whole site or, you could customise messages page by page. If I had a big audience, I would find my most visited content and test out different messages and see if affected engagement.

What should I write in the tab?:

There’s a character limit to browser tab content before it truncates and of course the more tabs open the smaller this limit will be. Keep it short and sweet and if you’re really into it, test it. Here’s a few ideas:

  • Don’t go I f$£!ing love you
  • Come back and i’ll buy you lunch
  • 10% off with code ‘tab10’!
  • Nooo, my self esteem…
  • Were we boring you?

This isn’t going to set the world on fire but I have had a number of people mention it.

If you use this, please share any findings ❤


Leave a Reply