W3C home > Mailing lists > Public > public-html@w3.org > April 2011

How to get Content-Type?

From: Nathan <nathan@webr3.org>
Date: Sun, 10 Apr 2011 12:02:38 +0100
Message-ID: <4DA18E4E.1020303@webr3.org>
To: HTML WG <public-html@w3.org>
Hi All,

Is there any way to get the Content-Type for the document currently 
being presented? (text/plain, text/html, etc)

If not, perhaps this would be a useful addition, I've recently found 
myself using designMode and a series of bookmarklets to enable editing, 
and saving back to a webdav enabled source using PUT (again from a 
bookmarklet), and the only way I could see to find the content-type (so 
that one knows whether to grab the HTML, or textContent, or, and which 
content-type to PUT was to do a HEAD request via xhr, which isn't ideal 
considering the information could easily be exposed (I presume).

Best,

Nathan
Received on Sunday, 10 April 2011 11:03:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:27 GMT