Changing the title of a web page on the fly can be useful for a bunch of reasons.
Say you’re creating an app using jQuery for example and using a single page to house content which might be different depending on what action a user takes. (A recent example was an assessment page I was building for a video site. The user watches a video and then takes an assessment. The assessment questions vary based on the video they watched, but the format of the quiz is the same, so I decided to use one assessment page for all of the videos and then just change the contents dynamically. This of course includes the page title.)
So to cut a long story short, doing this in jQuery: ($(‘title’).text(var)) works in most browsers, but IE 7 and 8 throw this beauty of an error:
SCRIPT65535: Unexpected call to method or property access. jquery.min.js, line 3 character 32461
document.title = var;