2011 Apr 20, 2:27
2010 Sep 30, 2:48
A surprisingly readable and delightfully accurate summary of the history of MIME in the web followed by proposed next steps. Sounds like a plan to me! "We need a realistic transition plan from the
unreliable web to the more reliable one. Part of this is to encourage senders (web servers) to mean what they say, and encourage recipients (browsers) to give preference to what the senders are
2010 Mar 31, 7:59
Defines the mime type for JSON as well as JSON itself.
2010 Jan 26, 2:00
The sandbox attribute for the iframe element sounds like a big pit of issues. Includes a new mime type text/html-sandbox to put on content that shouldn't be rendered as html in browsers that don't
support the sandbox attribute.
2010 Jan 10, 4:07
Irritatingly, my G1 won't show me PDFs so I've made the Google Docs PDF viewer which will load PDFs on the
web up in Google Docs. Google Docs has the useful ability to display PDFs in web
browsers without any Adobe software and works (mostly) on Android.
This was very easy to put together as an Android activity. First its necessary to register the application as handling PDFs from the web. This is done via the intent-filter declaration in the
data android:scheme="http" android:mimeType="application/pdf"/
The action part says my activity will view PDFs, the data part says it accepts data with the PDF mime-type and with a URL that has an HTTP scheme. The browsable category is necessary to allow
links from a browser to open this activity.
Second, the activity opens up the browser to Google Docs pointing to the PDF.
Intent intent = new Intent();
This is very simple code to invoke a new intent browsing to a newly constructed URL for the PDF in Google Docs. That was easy.
2009 Sep 30, 5:16
Open source implementation of the mime sniffing standard that fell out of HTML5.
2009 Sep 29, 10:54
How Firefox and IE7&8 perform feed sniffing
2008 Mar 6, 2:22
Using IE's mimetype sniffing for XSS attacks.
2008 Mar 2, 9:18
This post is about creating a server side z-code
interpreter that represents game progress in the URI. Try it with the game Lost
I enjoy working on URIs and have the mug to prove it. Along those lines I've combined thoughts on URIs with interactive fiction. I have a
limited amount of experience with Inform which generates Z-Code so I'll focus on pieces written in that. Of course we can already have URIs
identifying the Z-Code files themselves, but I want URIs to identify my place in a piece of interactive fiction. The proper way to do this would be to give Z-Code its own mimetype and associate
with that mimetype the format of a fragment that would contain the save state of user's interactive fiction session. A user would
install a browser plugin that would generate URIs containing the appropriate fragment while you play the IF piece and be able to load URIs identifying Z-Code files and load the save state that
appears in the fragment.
But all of that would be a lot of work, so I made a server side version that approximates this. On the Web Frotz Interpreter page, enter the URI of a
Z-Code file to start a game. Enter your commands into the input text box at the bottom and you get a new URI after every command. For example, here's the
beginning of Zork. I'm running a slightly modified version of the Unix version of Frotz. Baf's Guide to the IF Archive has lists of IF games to try out.
There are two issues with this thought, the first being the security issues with running arbitrary z-code and the second is the practical URI length limit of about 2K in IE. From the Z-Code
standard and the Frotz source it looks like 'save' and 'restore' are the only commands that could do anything interesting outside of the Z-Code virtual machine. As for the length-limit on URIs I'm
not sure that much can be done about that. I'm using a base64 encoded copy of the compressed input stream in the URI now. Switching to the actual save state might be smaller after enough user
2007 Sep 10, 5:08
Syntax of mime-type names.
2007 May 11, 8:55Last time, I had written some resource tools
to allow me to view and modify Windows module resources in my ultimate and noble quest to
implement the XML content-type fragment in IE7. Using the resource tools I found that MSXML3.DLL isn't signed and that I can replace the XSLT embedded resource with my own, which is great news and
means I could continue in my endevour. In the following I discuss how I came up with this replacement for IE7's XML source view
At first I thought I could just modify the existing XSLT but it turns out that it isn't exactly an XSLT
, rather its an IE5 XSL
. I tried using the XSL to XSLT converter
linked to on MSDN, however the resulting document still
requires manual modification. But I didn't want to muck about in their weird language and I figured I could write my own XSLT faster than I could figure out how theirs worked.
I began work on the new XSLT and found it relatively easy to produce. First I got indenting working with all the XML nodes represented appropriately and different CSS classes attached to them to make
Next was the XML mimetype fragment which uses XPointer
, a framework around various different schemes for naming parts of an XML document. I focused on the
which is an extended version of XPath
. So I named my first task as getting XPaths working.
. From this this I can execute XPaths, however there's no builtin way to map from the XML nodes selected by
position in the document. For instance 'a3-e2-e' is the name produced for the 3rd attribute of the second element of the root element of the XML document. When producing the HTML for an XML node, I
them to their corresponding positions in the HTML.
With the hard part out of the way I changed the onload to get the fragment of the URI of the current document, interpret it as an XPath and highlight and navigate to the selected nodes. I also added
an interactive floating bar from which you can enter your own XPaths and do the same. On a related note, I found that when accessing XML files via the file URI scheme the fragment is stripped off and
The next steps are of course to actually implement XPointer framework parsing as well as the limited number of schemes that the XPointer framework specifies.
2005 Oct 13, 11:13
Multipart/form-data mimetype. Potentially used in HTML posts