Uri class and parser

Jacob Carlborg doob at me.com
Wed Oct 24 23:26:55 PDT 2012


On 2012-10-24 22:36, Adam D. Ruppe wrote:

> Yes, that's the term in the standard.
>
> http://en.wikipedia.org/wiki/Fragment_identifier
>
> Javascript calls it the hash though, but it is slightly different: the #
> symbol itself is not part of the fragment according to the standard.
>
> But javascript's location.hash does return it.
>
> URL: example.com/
>>>> location.hash
> ""
>
>>>> location.hash = "test"
> "test"
>
> URL changes to: example.com/#test
>
>>>> location.hash;
> "#test"
>
>
>
> The fragment would technically just be "test" there.

I've obviously done too much JavaScript :). Thanks for the clarification.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list