Add

Lorem ipsum

Lorem ipsum

A
A
A
Easter egg

3 views

2 min

How to Change the Browser Tab Title When a User Leaves the Page in Webflow

Learn how to change the tab title when a user leaves the page in Webflow with visibilitychange.

In this tutorial, Sandro, co-founder of the Gemeos Webflow agency, shows you how to change the tab title when a user leaves the page in Webflow.

BehaviorDisplayed title
Active pageNormal page title
Inactive pageAlternating messages

The script

Add this script to the Footer code field. Customize the messages in the messages array.

(function() {
var originalTitle = document.title;
var messages = ['👋 We miss you!', '⚡ We’ve got something new...', originalTitle];
var idx = 0, interval;
document.addEventListener('visibilitychange', function() {
if (document.hidden) {
interval = setInterval(function() {
document.title = messages[idx % messages.length];
idx++;
}, 1500);
} else {
clearInterval(interval);
document.title = originalTitle;
idx = 0;
}
});
})();

good to know

Use this script sparingly, with a sense of humor, rather than for purely marketing purposes. A fun message creates a little connection. Switch tabs after the page has loaded to test the effect.

Conclusion

A memorable little detail that makes people smile when they come back to the tab.

interactive example

Switch tabs after the page has loaded to see the title change

Good to know

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Lorem ipsum dolor sit amet consectetur.

Lorem ipsum dolor sit amet consectetur. Aliquam orci sagittis dignissim sapien praesent donec.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Published on

You might be interested in these tutorials

Similar tutorials

SEO / GEO

5 min read

5 views

How to Set Up a Redirect in Webflow? (2026)

Updated on 19.12.2025 by Sandro DA SILVA

SEO / GEO

5 min read

5 views

Add structured data to your Webflow site?

Updated on 21.08.2025 by Sandro DA SILVA

No-code

5 min read

5 views

How to Obfuscate a Link in Webflow

Updated on 23.04.2025 by Sandro DA SILVA

Let’s f*****G GO !!

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...