Apple Safari Bug with Hash-based Identitifiers?

Dear all:

I just found a strange bug (?) in Safari (under various Apple OS X versions) that can cause problems with purl.org-based Semantic Web ontologies:

If you click on the link of a URI reference that includes a hash fragment, like

    http://purl.org/goodrelations/v1#DayOfWeek

then Apple Safari resolves this to

    http://www.heppnetz.de/ontologies/goodrelations/v1

instead of (as e.g. Chrome) to

    http://www.heppnetz.de/ontologies/goodrelations/v1#DayOfWeek

The behavior is the same for vocabularies that use HTTP 302 and HTTP 303 redirects (historically, purl.org did not support 303s, so some of our vocabularies still use 302s). In both cases, the servers return, quite naturally, the URI without the fragment as the Location parameter (because the server does not see the fragment part anyway).

$ curl -I http://purl.org/goodrelations/v1#DayOfWeek
HTTP/1.1 302 Moved Temporarily
Date: Mon, 14 Apr 2014 16:40:35 GMT
...
Location: http://www.heppnetz.de/ontologies/goodrelations/v1
Content-Type: text/html; charset=iso-8859-1
...
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Length: 283


So in Safari, the fragment is stripped off after a 302 or 303 redirect.

I am not sure which behavior is standards-compliant, but from a user's perspective, Chrome is much better in here if you have many hash-based identifiers in an HTML document.

Any opinions or solutions?

Best wishes / Mit freundlichen Grüßen

Martin Hepp

-------------------------------------------------------
martin hepp
e-business & web science research group
universitaet der bundeswehr muenchen

e-mail:  martin.hepp@unibw.de
phone:   +49-(0)89-6004-4217
fax:     +49-(0)89-6004-4620
www:     http://www.unibw.de/ebusiness/ (group)
         http://www.heppnetz.de/ (personal)
skype:   mfhepp 
twitter: mfhepp

Check out GoodRelations for E-Commerce on the Web of Linked Data!
=================================================================
* Project Main Page: http://purl.org/goodrelations/

Received on Monday, 14 April 2014 16:51:02 UTC