W3C home > Mailing lists > Public > public-webapi@w3.org > May 2006

Indicating XHR conformance

From: Mark Nottingham <mnot@yahoo-inc.com>
Date: Wed, 10 May 2006 08:30:50 -0700
Message-Id: <A12EE7F3-B2CC-470C-A57F-955F362B27A8@yahoo-inc.com>
To: "Web APIs WG (public)" <public-webapi@w3.org>

I'm wondering if it would be useful to have some optional flags in  
implementations that developers can use to test for. While many JS  
features can be tested for by testing a property, this isn't so for  
XHR; e.g., you can't easily test to see if it supports more than GET  
and POST, for example, or if the cache is correctly implemented.

For example, we could specify a tree of properties on the navigator  
object that are tied to passing the test suite; authors could use  
that to figure out if certain features are supported. E.g.,

navigator.w3c.xhr.full  // passes the full test suite
navigator.w3c.xhr.core // passes all of the MUST-level requirements  
in XHR
navigator.w3c.xhr.cache // passes all HTTP caching-related tests
navigator.w3c.xhr.redirect // passes all HTTP redirect-related tests

There are many ways that this could be done, of course; that's just  
an example.

The biggest downside I can see is that a vendor might not correctly  
set them (through accident or maliciously). However, even in that  
case, it's a lot easier for authors to test for the property and then  
make an exception or two, rather than test every browser and maintain  
a whitelist in code.

Mark Nottingham
Received on Wednesday, 10 May 2006 15:31:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:21 UTC