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).


Received on Sunday, 10 April 2011 11:03:12 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:36 UTC