[whatwg] <a onlyreplace>

Nelson Menezes flying.mushroom at gmail.com
Sun Oct 18 03:02:04 PDT 2009


The cruft in the hash is needed so that we know what IDs to refresh
when navigating back (which could be taken away into a JS URL-to-IDs
map), and to detect a change if the same URL is accessed several times
(that's probably overkill). Still, the point was to show it can work
today; it really isn't an elegant solution as-is :)

Nelson Menezes
http://fittopage.org



2009/10/18 Jonas Sicking <jonas at sicking.cc>:
> On Sat, Oct 17, 2009 at 12:45 PM, Nelson Menezes
> <flying.mushroom at gmail.com> wrote:
>> 2009/10/17 Jonas Sicking <jonas at sicking.cc>:
>>> In fact, you don't even need to use pushState. For now this can be
>>> faked using onhashchange and fragment identifier tricks. It's
>>> certainly not as elegant as pushState (that is, after all, why
>>> pushState was added), but it's something that can be tried today.
>>
>>
>> Well, here's a badly-hacked-together solution that emulates this behaviour...
>>
>> I think it'll be helpful even if it only gets used in a JS library as
>> you mention (change the attribute to a classname then). Still, it can
>> be made to work with today's browsers:
>>
>> http://test.fittopage.org/page1.php
>
> Yay, sweet! But why so much cruft in the hash? Also, going back to the
> original page (where there is no hash) doesn't seem to work (at least
> in Firefox trunk nightlies).
>
> / Jonas
>


More information about the whatwg mailing list