/* Another whimsical browser proof-of-concept: http://lcamtuf.coredump.cx/switch/ It seems that relatively few people realize that holding a JavaScript handle to another window (either because we opened it, or because the window was at some point displaying our content) allows the attacker to tamper with the location and history objects at will, largely bypassing the usual SOP controls. With some minimal effort and the help of data: / javascript: URLs or precached pages, this can be leveraged to replace content in a manner that will likely escape even fairly attentive users. /mz */

The old switcharoo

This is hardly new, but illustrates the effectiveness of using data: or precached content to do the deed. You're probably fooling yourself if you think you'd spot this happening to you in the wild.

PS. If you don't get it, close the window and try again. If you're still stumped, view the source.