W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2007

[whatwg] Radio UserLand: Mail from Ian Hickson

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 18 May 2007 23:19:25 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0705182312220.29363@dhalsim.dreamhost.com>
On Fri, 22 Apr 2005, Brad Neuberg wrote:
>
> Here's a possible API for GET and POST semantics without XmlHttpRequest:
> 
> window.location.href = base URL + URL parameters already appended 
> window.location.method = GET or POST, nothing else supported
> 
> If the method is a POST method, the internal code simply pulls all the 
> parameters off of window.location.href and builds up a POST request 
> using them.  Should it URL encode each query parameter and key first, or 
> assume that they are already URL-encoded?

Would this just be to do a scripted navigation to a POST page?

A .method property on 'location' is an interesting idea, but it would 
probably end up confusing (what if you set it and another script does a 
.href="" thinking it will do a GET?).

window.location.post() is probably the best plan if we want to do this, I 
think. The question is, what exactly is the use case? Do we want to be 
doing POSTs like this without the user knowing, and with JS required?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 18 May 2007 16:19:25 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:55 UTC