[whatwg] Reserved browsing context names

Boris Zbarsky bzbarsky at MIT.EDU
Fri May 13 18:56:37 PDT 2011

On 5/13/11 4:46 PM, Ian Hickson wrote:
> The sum total of what the spec has to say on the matter is "User agents
> may support secondary browsing contexts, which are browsing contexts that
> form part of the user agent's interface, apart from the main content
> area"; I think it's perfectly reasonable for a user agent that implements
> such a thing to have an applicable specification that defines specific
> behaviour for its secondary browsing contexts that open links wherever
> they want.

OK, I see.

>> In addition, there is existing deployed content using the special names
>> to target the main content area which would break if the special-casing
>> of those names were removed....  so I doubt it'll be removed.
> Ah, interesting. Do you have any links to such documents so I could study
> them? What do these links do in other browsers?

I don't have links offhand, unfortunately; just past sidebar things I've 
used and now forgotten the location of plus documentation on the web 
about authoring things with target="_main" [1].

I just tested what this document does in the main content area:

   <!DOCTYPE html>
   <a href="http://web.mit.edu" target="_main">Click me</a>

It looks like this opens a new browsing area in WebKit and Presto and 
loads the link in the tab I clicked the link in in Gecko and Trident 
(IE9).  I did not test the exact Trident behavior here; the Gecko 
behavior is that in the content area "_main" is an alias for "_top" (as 
opposed to targeting the currently open tab, say).  A bit of testing 
seems to suggest that Trident treats it as an alias for "_self" in at 
least some cases, corroborated by some threads out there [2].

A similar document with target="_content" loads in a new browsing area 
in all the non-Gecko browsers; I can probably remove support for this 
from Gecko as well.

I did some googling just now, and pretty quickly found an actual web 
page that uses target="_main":  http://www.ejflavors.com/orangemoon/

The question of how to proceed here is a good one.  Supporting different 
targeting algorithms in different browsing contexts is a bit of a pain, 
so it would be good, imo, if we could converge the targeting algorithms 
for primary and secondary browsing contexts for fixed names....  That 
said, for target="_main" even the primary browsing context interop story 
is sad, apparently.


[1] http://www.howtocreate.co.uk/tutorials/jsexamples/createSidebar.php

More information about the whatwg mailing list