I have a flex application where I am using different state. Say i have a base state which has a login page and after successfull login validation i will switch to some other state. Now when user in some other state(other than base state) and user click on refresh button on browser base state is getting displayed.
Could you please let me know how can we avoid this?
You can utilize the BrowserManager class for deep linking. Assume your website is www.example.com and you have two states 1 (default) and 2. Using deep linking, your default URL will be:
When changing state, just update the URL to
Then, if users press Refresh button, the browser will navigate to www.example.com#state=2 instead of the default URL. After all, add a block of code to check the URL every time the Application is loaded (first time open, refresh,...).
Hope this help.
Thanks , I am able to achieve what i wanted through browsermanager and lot more