Monday, December 2, 2013

Back button should now work!

Ocicat kitten, 5 weeks, (c) Heikki Hannikainen
Last night I spent a couple hours trying to improve URL navigation on the aprs.fi real-time map. The back and forward buttons have behaved quite weirdly for some time, and that simply needed to be fixed. The upgrade went in just a few minutes ago.

With the help of the HTML5 history API I think I mostly got it right now. It is of course likely that I missed some corners, so keep the feedback coming - either in blog comments or posts on the discussion group.

Basically, the browser history now only gets a new entry when the user initiates a "major change" in the map status: a new callsign or a new address is searched. Those new history entries can be navigated using the web browser's back and forward buttons.

Minor state changes, such as changing the time range / tail length parameters, and any changes not initiated by the user, should only update the current browser history entry. After first looking up station A, then looking up station B, and then changing time range, clicking back will take you to station A. Clicking forward will then take you to station B - with the changed time range! Try it out, you'll see what I mean.

Naturally this won't work so nicely with steam-powered web browsers, or the oldest boat anchors out there.

Christmas is coming, and postcards need to be printed, so I was required to take some kitten photos with seasonal props yesterday.

2 comments:

Steve said...

Glad to see you're a cat lover as well Heikki, nice photo have a nice Christmas.
Steve

Hasan said...

2 Indoor, 4 outdoor, all were feral, just showed up out here on 9 acres in the country. Now all are lap cats! BTW, love this site. I must have 10 different APRS programs running, two on Raspberry Pi2, two on phones/tablets (aprsdroid), the rest on Win7.