I would like to switch the title of a page, just like it appears in facebook messenger when someone sends a message. The problem is that my code does not stay there too regular can anyone help me?
Code
setInterval(function(){document.title = '('+ data +') Tickets'; }, 1000);
setInterval(function(){document.title = 'Tem '+ data +' Tickets'; }, 1500);