I suggest we inject a <base> tag automatically, or, better yet, allow
gadget developers to control the content of the <head> section.
I personally don't have any strong preferences on the precise
mechanism. As long as others are willing to propose concrete details,
I will stay out of that debate.
I believe that someone previously brought up the idea of adding a substitution token like __BASE_URL__ that would be rewritten with the base URL of the gadget. This way, authors would have a bit more control compared to automatic rewriting. I can't remember if there were any inherent problems with this approach, though... is this still a possibility?
<base> may cause more headaches when we inline, and I could also see it causing problems with the social XHR requests (which may use a relative URL back to the server).
Thus far <base> does seem like the obvious solution.
Concretely, the proposal is:
"When rendering a gadget in an IFRAME which has URL [gadgetUrl],
inject <base>[gadgetUrl]</base> in the <head> section of output."
For completeness, does anybody know if:
A) all major browsers support <BASE> URL resolution for...
True. I just wanted to ensure that all the browsers we care about accurately support HTML4 and 5. :)
Re: target form, we don't care so we're covered.