This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://www.w3.org/TR/html5/webappapis.html#javascript-protocol Currently, dereferencing a javascript: scheme URI treats its script evaluation result as the body of an HTTP response with Content-Type 'text/html'. Navigation then uses Media Type Sniffing to adjust this Content-Type and dispatch corresponding processing. http://www.w3.org/TR/html5/fetching-resources.html#content-type-sniffing-0 According to 'Media Type Sniffing', the sniffed content type is either 'text/html', 'application/rss+xml', or 'application/atom+xml'. This precludes processing for other media types (eg, other XML media types like 'application/xhtml+xml' or 'image/svg+xml') a javascript: URI could generate. I propose allowing the script result to explicitly specify the HTTP 'Content-Type' entity header as if it were a partial HTTP response lacking a start-line. Eg, evaluating the script could result in a string like this: Content-Type: <media-type> <message-body> The user-agent could supply a function to facilitate writing these correctly (inserting field-names, colons, and carriage return linefeed sequences; cleaning the content; etc). I invite the reader to consider other options if this one is unsatisfactory.
I doubt WebKit would implement this behavior. Please use data URLs instead. JavaScript URLs exist only to service legacy content.
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Rejected Change Description: no spec change Rationale: see comment 1. This is just legacy behaviour.
mass-move component to LC1