Ajouter

Lorem ipsum

Lorem ipsum

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

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...