These are chat archives for opal/opal

15th
Dec 2015
Jamie Gaskins
@jgaskins
Dec 15 2015 02:51
@Thermatix The Clearwater router only uses pushState for navigation. It's supported in IE10+ and in all other major browsers for the past 4-5 years. You do need to listen for the popstate event, though, in case someone hits the back button.
Jamie Gaskins
@jgaskins
Dec 15 2015 03:10
I've done a lot of thinking about gracefully degrading to fragment-based routing, though. Basically, what I'd been thinking of doing in Clearwater (if anyone needed fragment-based routing): https://gist.github.com/jgaskins/6624fbb7c6d678439b8c
That lets people without pushState use fragment-based routing, and if they share a URL with someone who does have pushState in their browser, the router would override the path in the URL with the fragment.
So it degrades and upgrades equally gracefully.
Martin Becker
@Thermatix
Dec 15 2015 11:40
@jgaskins yeah, I realised the back,forward thing but that's implemented, the only thing is when the user refreshes the browser my router can't catch it (other then to state are you sure you want to navigate), but I think that's solved by nginx and or apache.