Page title notifications switch between the default page title and a notification message continously in order to grab the user’s attention. This is commonly used with chat applications.


I’ve written a small javascript object which can be used to switch on and off page title notifications.

To activate the page title notification call the following:

PageTitleNotification.On("New Chat Message!");

Then call the following to turn it off:


The default speed is 1000 milliseconds, but this can be customised by passing a 2nd parameter to the On() function.

PageTitleNotification.On("New Chat Message!", 5000);

To use this download the minified javascript version here:


Or you can use the un-minified source code here:

var PageTitleNotification = {
        OriginalTitle: document.title,
        Interval: null
    On: function(notification, intervalSpeed){
        var _this = this;
        _this.Vars.Interval = setInterval(function(){
             document.title = (_this.Vars.OriginalTitle == document.title)
                                 ? notification
                                 : _this.Vars.OriginalTitle;
        }, (intervalSpeed) ? intervalSpeed : 1000);
    Off: function(){
        document.title = this.Vars.OriginalTitle;   

View Demo

Hope this comes in help, comment if you have any issues/suggestions!

UPDATE – November 2015

New improved version now available on GitHub.