W3C home > Mailing lists > Public > public-bpwg-ct@w3.org > April 2008

RE: AJAX and CT Proxies

From: JOSE MANUEL CANTERA FONSECA <jmcf@tid.es>
Date: Wed, 30 Apr 2008 22:19:48 +0200
To: Sean Patterson <SPatterson@Novarra.com>, public-bpwg-ct <public-bpwg-ct@w3.org>
Message-id: <93AA9E47B82F684A868C217766F48905039F88339E@EXCLU2K7.hi.inet>

Hi,

Do you really need a new header? If some entity in delivery chain issue a new HTTP request saying

Accept: application/xml; application/json

it should be considered as something not to be touched. I think this is more consistent with the HTTP protocol design. This approach it is also friendly and consistent with requests coming from J2ME clients, which should also be taken into account. Besides, if the CT proxy detects a response with those Content-Types should leave the response as it is.

If you flag requests coming from the XMLHttpRequest object you could still face the following problem:

Imagine you are using the XMLHttpRequest mechanism to inject some HTML code in your page. In that case the request comes from the XMLHttpRequest mechanism but a CT proxy might be useful to adapt that HTML code that it is the result of the XMLHttpRequest.

It seems to me that some kind of mechanism based on accept headers could be the most flexible approach

Best Regards
________________________________________
De: public-bpwg-ct-request@w3.org [public-bpwg-ct-request@w3.org] En nombre de Sean Patterson [SPatterson@Novarra.com]
Enviado el: miércoles, 30 de abril de 2008 21:27
Para: public-bpwg-ct
Asunto: AJAX and CT Proxies

Re: our discussion of how to detect that a request is really an XHR.

According to this blog post: http://www.dev411.com/blog/2006/06/30/should-there-be-a-xmlhttprequest-user-agent, at least one of the JS libraries out there (Prototype) uses the X-Requested-With header to indicate that the request is an XHR.  Evidently Dojo and MochiKit don’t send any identifying headers at all, although some people are manually adding some.  The author of the post is proposing an “X-Ajax-Engine” to identify XHR requests.

This post is from 2006, so I’m not sure what the state of affairs is currently, but I wanted to point out that there seem to be some other people thinking about this issue.

Sean
Received on Wednesday, 30 April 2008 20:24:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 April 2008 20:24:10 GMT