Re: [whatwg] HTTP status code from JavaScript

2014-05-26 Thread David Bruant
Le 26/05/2014 01:52, Michael Heuberger a écrit : Serving different content based on different URLs (and status) actually does make a lot of sense when you want your user to see the proper content within the first HTTP round-trip (which saves bandwidth). If you always serve generic content and fig

Re: [whatwg] HTTP status code from JavaScript

2014-05-26 Thread Michael Heuberger
David, you have very good points here. See below: > ... Yeah of course I could do that too. It is psychologically proven that the subjective waiting time is shorter when you see something as soon as possible. >>> Yes and what I'm suggesting is providing actual content as so

Re: [whatwg] HTTP status code from JavaScript

2014-05-26 Thread Michael Heuberger
Yeah, something like that Austin. But like I mentioned, why add the status code inside the HTML code when it's already available in the HTTP status header? Hence I raised "redundancy" multiple times before. I could do that but not thanks. I still believe that JavaScript should be able to parse th

Re: [whatwg] HTTP status code from JavaScript

2014-05-26 Thread James Greene
I like the `window.http` idea mentioned earlier by Michael. Something like: ```js window.http = { url: window.location.href, status: 404, headers: { /* ... */ } }; ``` If implemented, this would also be easy to polyfill in older browsers using the duplicate AJAX request hack that Mich

Re: [whatwg] HTTP status code from JavaScript

2014-05-26 Thread Michael Heuberger
Exactly :) Thanks James! On 27/05/14 14:06, James Greene wrote: > I like the `window.http` idea mentioned earlier by Michael. Something like: > > ```js > window.http = { > url: window.location.href, > status: 404, > headers: { > /* ... */ > } > }; > ``` > > If implemented, this would

Re: [whatwg] I take back my request for this instead. SVG API

2014-05-26 Thread Ian Hickson
On Sat, 24 May 2014, Emanuel Allen wrote: > > SVG API for the canvas element, simple call svg; var ctx = > canvas.getContext("svg"); How would this work? Can you elaborate? -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A