<div>On Wed, Dec 10, 2008 at 6:01 AM, Anne van Kesteren <span dir="ltr"><<a href="mailto:annevk@opera.com">annevk@opera.com</a>></span> wrote: <br></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
I think we need more use cases than just this (especially since this one seems addressed already) to consider this.<br></blockquote><br>I agree we need more use cases. You understand that the Accept-Language header is just one example of a header that needs to be read via scripting; the use case addressed by "Language JSONP Service" highlights the need for getRequestHeaders() since its solution is an inefficient (although clever) hack. Ideally, scripts should be able to access all of the request and response headers.<br>
<br>Another use case would be getting the "Accept" header to detect if the client can be served XHTML.<br><br>Weston<br><br><br><div class="gmail_quote">On Wed, Dec 10, 2008 at 6:01 AM, Anne van Kesteren <span dir="ltr"><<a href="mailto:annevk@opera.com">annevk@opera.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Thu, 30 Oct 2008 08:21:10 +0100, Weston Ruter <<a href="mailto:weston@shepherd-interactive.com" target="_blank">weston@shepherd-interactive.com</a>> wrote:<br>

</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
I have an amendment to my proposal. There was a<br></div>
post<<a href="http://ajaxian.com/archives/language-jsonp-service" target="_blank">http://ajaxian.com/archives/language-jsonp-service</a>>on Ajaxian<div class="Ih2E3d"><br>
today about a "Language JSONP Service" which "calculates the<br>
users language based on browser headers". This seems like a terrible<br>
workaround since the Accept-Language header is sent from the same browser<br>
that the script is running in; a script shouldn't have to make an HTTP<br>
request just to find out what the browser's request headers are.<br>
</div></blockquote>
<br>
Did you read what kriszyp wrote in a comment to that post?<div class="Ih2E3d"><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Therefore, I propose that in addition to implementing on HTMLDocument the<br>
XMLHttpRequest interface subset I initially suggested, I see that it would also be very useful for a script to obtain the request headers that were<br>
sent which resulted in the current document as the response. The current<br>
version of XMLHttpRequest hints to a future version including a<br>
getRequestHeader() method, a method which would complement<br>
getResponseHeader(); there could also be a getAllRequestHeaders() method<br>
that would correspond to the existing getAllResponseHeaders() method.<br>
(Obviously it would not make sense to implement the setRequestHeader()<br>
method.)<br>
<br>
If these two methods ( getRequestHeader() and getAllRequestHeaders() ) were<br>
implemented, then there would be no need for a "Language JSONP Service"<br>
because there would be a better way to get the same result synchronously<br>
without any HTTP request, for example:<br>
document.getRequestHeader('Accept-Language')<br>
</blockquote>
<br></div>
I think we need more use cases than just this (especially since this one seems addressed already) to consider this.<br><font color="#888888">
<br>
<br>
-- <br>
Anne van Kesteren<br>
<<a href="http://annevankesteren.nl/" target="_blank">http://annevankesteren.nl/</a>><br>
<<a href="http://www.opera.com/" target="_blank">http://www.opera.com/</a>><br>
</font></blockquote></div><br>