Changing the tab (or window) title is an age old practice. Gmail does it to notify the user of a new chat message and this blog does it to update the tab title after a new page loads via AJAX. How is it done? By setting a property on the
document object, of course:
That property, of course, is
document.title = 'Hello!'; // New title :)
One common misconception is that you change the
window.title property, but you must use the
document object, otherwise you'll see no effect. You'll oftentimes see a
setInterval used with
document.title to quickly change title to get the user's attention.
I love almost every part of being a tech blogger: learning, preaching, bantering, researching. The one part about blogging that I absolutely loathe: dealing with SPAM comments. For the past two years, my blog has registered 8,000+ SPAM comments per day. PER DAY. Bloating my database...
One of the hidden gems within the HTML5 spec is context menus. The HTML5 context menu spec allows developers to create custom context menus for given blocks within simple menu and menuitem elements. The menu information lives right within the page so...