Let's say I have a "report" page that can be customized via Javascript. Say I have start_date, end_date and type ("simple", or "full") that can be changed. Now I want the address bar to always contain a "permalink" of the current (customized) view, so the user can easily copy it.
If I'd do this without Ajax, I would simply use something like "/report/?start_date=2010-01-01&end_date=2010-01-31&type=full" as a permalink. But since I want to update the URL from Javascript, I need to use the anchors (#), otherwise the whole page would need to be reloaded.
Is there any best practice for how to generate permalinks in this case? I'd go with something like "/report/#start_date=2010-01-01,end_date=2010-01-31,type=full" and parse that thing in Javascript. Is there any better or more generally accepted way to deal with this?
Also, is there any better way to deal with the Javascript side rather than simply parsing everything?
Thanks.