Skip to content Skip to sidebar Skip to footer

Url Hash Format, What's Allowed And What's Not?

I'm using hash-based navigation in my rich web app. I also found I needed to create permalinks that would point to single instances of resources, but since I cannot cause the page

Solution 1:

Look at: http://www.w3.org/Addressing/rfc1630.txt or http://www.w3.org/Addressing/URL/4_2_Fragments.html

Basically you can use anything that can be encoded in an URL.

Note: There might be browser inconsistencies. If you fear them, you might use a serialization mechanism, like converting the string to hex or something (will be twice longer though), or use an id of some sort.

Solution 2:

This document should help. Slashes are allowed, but the lexical analysis might differ between browsers.

Solution 3:

I think you might find that useful: RFC3986

If you use PHP to generate your page paths you could also urlencode() which generates you a valide URL.

Post a Comment for "Url Hash Format, What's Allowed And What's Not?"