rio page 11 - Dave's Blog

Search
My timeline on Mastodon

URI Fragment Info Roundup

2008 Apr 21, 11:53

['Neverending story' by Alexandre Duret-Lutz. A framed photo of books with the droste effect applied. Licensed under creative commons.]Information about URI Fragments, the portion of URIs that follow the '#' at the end and that are used to navigate within a document, is scattered throughout various documents which I usually have to hunt down. Instead I'll link to them all here.

Definitions. Fragments are defined in the URI RFC which states that they're used to identify a secondary resource that is related to the primary resource identified by the URI as a subset of the primary, a view of the primary, or some other resource described by the primary. The interpretation of a fragment is based on the mime type of the primary resource. Tim Berners-Lee notes that determining fragment meaning from mime type is a problem because a single URI may contain a single fragment, however over HTTP a single URI can result in the same logical resource represented in different mime types. So there's one fragment but multiple mime types and so multiple interpretations of the one fragment. The URI RFC says that if an author has a single resource available in multiple mime types then the author must ensure that the various representations of a single resource must all resolve fragments to the same logical secondary resource. Depending on which mime types you're dealing with this is either not easy or not possible.

HTTP. In HTTP when URIs are used, the fragment is not included. The General Syntax section of the HTTP standard says it uses the definitions of 'URI-reference' (which includes the fragment), 'absoluteURI', and 'relativeURI' (which don't include the fragment) from the URI RFC. However, the 'URI-reference' term doesn't actually appear in the BNF for the protocol. Accordingly the headers like 'Request-URI', 'Content-Location', 'Location', and 'Referer' which include URIs are defined with 'absoluteURI' or 'relativeURI' and don't include the fragment. This is in keeping with the original fragment definition which says that the fragment is used as a view of the original resource and consequently only needed for resolution on the client. Additionally, the URI RFC explicitly notes that not including the fragment is a privacy feature such that page authors won't be able to stop clients from viewing whatever fragments the client chooses. This seems like an odd claim given that if the author wanted to selectively restrict access to portions of documents there are other options for them like breaking out the parts of a single resource to which the author wishes to restrict access into separate resources.

HTML. In HTML, the HTML mime type RFC defines HTML's fragment use which consists of fragments referring to elements with a corresponding 'id' attribute or one of a particular set of elements with a corresponding 'name' attribute. The HTML spec discusses fragment use additionally noting that the names and ids must be unique in the document and that they must consist of only US-ASCII characters. The ID and NAME attributes are further restricted in section 6 to only consist of alphanumerics, the hyphen, period, colon, and underscore. This is a subset of the characters allowed in the URI fragment so no encoding is discussed since technically its not needed. However, practically speaking, browsers like FireFox and Internet Explorer allow for names and ids containing characters outside of the defined set including characters that must be percent-encoded to appear in a URI fragment. The interpretation of percent-encoded characters in fragments for HTML documents is not consistent across browsers (or in some cases within the same browser) especially for the percent-encoded percent.

Text. Text/plain recently got a fragment definition that allows fragments to refer to particular lines or characters within a text document. The scheme no longer includes regular expressions, which disappointed me at first, but in retrospect is probably good idea for increasing the adoption of this fragment scheme and for avoiding the potential for ubiquitous DoS via regex. One of the authors also notes this on his blog. I look forward to the day when this scheme is widely implemented.

XML. XML has the XPointer framework to define its fragment structure as noted by the XML mime type definition. XPointer consists of a general scheme that contains subschemes that identify a subset of an XML document. Its too bad such a thing wasn't adopted for URI fragments in general to solve the problem of a single resource with multiple mime type representations. I wrote more about XPointer when I worked on hacking XPointer into IE.

SVG and MPEG. Through the Media Fragments Working Group I found a couple more fragment scheme definitions. SVG's fragment scheme is defined in the SVG documentation and looks similar to XML's. MPEG has one defined but I could only find it as an ISO document "Text of ISO/IEC FCD 21000-17 MPEG-12 FID" and not as an RFC which is a little disturbing.

AJAX. AJAX websites have used fragments as an escape hatch for two issues that I've seen. The first is getting a unique URL for versions of a page that are produced on the client by script. The fragment may be changed by script without forcing the page to reload. This goes outside the rules of the standards by using HTML fragments in a fashion not called out by the HTML spec. but it does seem to be inline with the spirit of the fragment in that it is a subview of the original resource and interpretted client side. The other hack-ier use of the fragment in AJAX is for cross domain communication. The basic idea is that different frames or windows may not communicate in normal fashions if they have different domains but they can view each other's URLs and accordingly can change their own fragments in order to send a message out to those who know where to look. IMO this is not inline with the spirit of the fragment but is rather a cool hack.

PermalinkCommentsxml text ajax technical url boring uri fragment rfc

We Tell Stories

2008 Apr 17, 9:54Six stories told in various Internet-y ways like as points on a google map or with infographics.PermalinkCommentsvia:boingboing art book mashup map information visualization

Mario Theme Played with RC Car and Bottles Video

2008 Apr 15, 11:23Reminds me of the sequences where you must collect notes in Super Mario Galaxy.PermalinkCommentshumor mario music video videogame via:boingboing

Warm Weekend

2008 Apr 14, 10:22

Cafe Pirouette ExteriorIt was warm and lovely out this past Saturday and Sarah I and went to a new place for lunch, then to Kelsey Creek Park, and then out for Jane's birthday. We ate at Cafe Pirouette which serves crepes and is done up with French decorations reminding me of my parent's house. We got in for just the end of lunch and saw the second to last customers, a gaggle of older ladies leaving. I felt a little out of place with my "Longhorn [heart] RSS" t-shirt on. The food was good and in larger portions that I expected.

Kelsey Creek FarmAfter that we went to Kelsey Creek Park and Farm. The park is hidden at the end of a quiet neighborhood, starts out with some tables and children's jungle gym equipment, then there's a farm which includes a petting zoo, followed by many little trails going off into the forrest. There weren't too many animals out and the ones we did see didn't seem to expect or want the sun and warm weather. We followed one of the trails for a bit and turned back before getting sun burned. You can see my weekend photos mapped out on Live Maps.

That night we went out with some friends for Jane's birthday. Eric was just back from the RSA conference and we met Jane and Eric and others at Palace Kitchen in Seattle located immediately adjascent to the monorail's route. The weather was still good so they left the large windows open through twilight and every so often you'd see the monorail pass by.

PermalinkCommentswashington bellevue weekend nontechnical

Cafe Pirouette Exterior

2008 Apr 13, 8:44

sequelguy posted a photo:

Cafe Pirouette Exterior

calendar.thenewstribune.com/bellevue-wa/venues/show/25896...

PermalinkCommentsrestaurant washington bellevue cafepirouette

Cafe Pirouette Interior

2008 Apr 13, 8:43

sequelguy posted a photo:

Cafe Pirouette Interior

PermalinkCommentsrestaurant washington bellevue cafepirouette

The New Cult Canon: Primer | The A.V. Club

2008 Apr 10, 3:36See, the AV Club says Primer is awesome too! But don't read this or any other review, rather take my word for it and watch the movie now without any prior knowledge.PermalinkCommentscult primer movie onion av-club reviews

IndieGames.com - The Weblog - Freeware Game Pick: Rom Check Fail (Farbs)

2008 Apr 10, 3:23Recommended by AV Club. Play pieces of classic games mixed together.PermalinkCommentsgame humor mashup mario zelda remix videogame art

NFT - Not For Tourists - Seattle - City Guidebooks, Maps, Urban Neighborhoods, Travel

2008 Mar 31, 2:31Social local's guide to various areas including Seattle.PermalinkCommentsvia:swannman guide seattle food social

Digging in : NTFS Time Stamps --file created in 1601, modified in 1801 and accessed in 2008!!

2008 Mar 31, 1:11Guy messes with various file timestamps on NTFS on Windows.PermalinkCommentstime timestamp ntfs windows blog article

New Scientist Combined Blogs

2008 Mar 9, 2:42The various New Scientist blogs combined into one.PermalinkCommentsblog monthly new-scientist rss feed

The life and times of America's greatest hoaxer. - By Joe Keohane - Slate Magazine

2008 Mar 3, 4:16An article on the documentary of Alan Abel hilarious hoaxer. "The idea was to write a satire about a group called "The Society for Indecency to Naked Animals," or SINA, which would call for animals to be clothed for the sake of decency."PermalinkCommentsvia:mattalyst humor article Abel-Raises-Cain dvd movie documentary Alan-Abel cultural-disobediance

The Simpsons Archive: George Meyer Interview (March 2000)

2008 Feb 24, 12:24Simpsons Archive posts an article: "George Meyer" By David Owen, "Taking Humor Seriously - George Meyer, the funniest man behind the funniest show on TV." (c) The New Yorker, March 13, 2000. Brief mention of Army Man.PermalinkCommentshumor simpsons george-meyer army-man

Mechanically Separated Meat - Blog Archive - Super Mario World vs. the Many-Worlds Interpretation of Quantum Physics

2008 Feb 19, 8:57A video of a player's many attempts at the same level in a hacked Super Mario World game overlayed on top of one another.PermalinkCommentsvideo mario game quantum-physics via:boingboing

Chumby will be cool, despite its name

2008 Feb 19, 1:51

Bedside ChumbyI signed up for the pre-release beta and purchased a Chumby last year. Chumby looks like a cousin to a GPS unit. Its similar in size with a touch screen, but has WiFi, accelerometers, and is pillow like on the sides that aren't a screen. In practice its like an Internet alarm clock that shows you photos and videos off the Web. Its hackable in that Chumby Industries tells you about the various ways to run your own stuff on the Chumby, modifying the boot sequence (it runs Linux), turning on sshd, etc, etc. The Chumby forum too has lots of info from folks who have found interesting hacks for the device.

When you turn on the Chumby it downloads and runs the latest version of the Chumby software which lets you set alarms, play music, and display Flash widgets. The Chumby website lets anyone upload their own Flash widgets to share with the community. I tried my hand at creating one using Adobe's free Flash creation SDK but I don't know Flash and didn't have the patience to learn.

Currently my Chumby is set to wake me up at 8am on weekdays with music from ShoutCast and then displays traffic and weather. At 10am everyday it switches to showing me a slide-show of LolCats. At 11pm it switches to night mode where it displays the time in dark grey text on a black background at a reduced light level so as not to disturb me while I sleep.

I like the Chumby but I have two complaints. The first is that it forces me to learn flash in order to create anything cool rather than having a built-in Web browser or depending on a more Web friendly technology. The second complaint is about its name. At first I thought the name was stupid in a kind of silly way, but now that I'm used to the name it sounds vaguely dirty.

PermalinkCommentschumby review flash linux

reddit.com: Post the Funniest Joke You Know... Upmod the Best One

2008 Feb 18, 5:54Reddit comments consisting of various jokes of various quality. Many many jokes here.PermalinkCommentsvia:felix42 humor joke reddit

Snap Shots Manual

2008 Feb 11, 10:07Snap Shots manual describes what they do with various kinds of URIs.PermalinkCommentsreference uri snapshot

Periodic Table Printmaking Project

2008 Jan 30, 1:55Periodic table with each element represented as a its own painting by different artists.PermalinkCommentsvia:boingboing science periodic-table-of-elements art visualization

Ben Folds Myspace Gig playlist on YouTube

2008 Jan 29, 5:10Ben Folds performs his myspace gig, webcast live from his studio in Nashville, Tennessee on October 24th 2006. The performance has been split into various videos gathered here. I hadn't heard "Bitches Ain't Shit" like that before (last video).PermalinkCommentsben-folds ben-folds-five bff music video myspace youtube performance live

YouTube - Daily Show & Colbert Report Writers in Mock WGA Debate

2008 Jan 26, 12:32Another hilarious Internet video generated from the writer strike. Yay for the strike!PermalinkCommentsvia:boingboing wga writing writers-strike video youtube tv daily-show colbert-report
Older EntriesNewer Entries Creative Commons License Some rights reserved.