My first question would be, what use case is there where the user is
refreshing their browser screen while using your app? Second question is,
why would the user have the expectation that refreshing their web page would
not reload everything (and thus reset it back to an initial state)?

Of course, you don't have to make the user login again when they refresh the
page. Use the same techniques any website would: store a cookie with session
information that your app can check and automatically log the user in with.
If you don't want to set a cookie, store it in a shared object and do the
same thing.

Sounds to me like over-engineering... I would anticipate that the majority
of users would have no expectation of the app remaining in *exactly* the
same state if they refereshed the webpage. In fact, having the app reset
when the page is refreshed is actually good... built-in "reset" button for
your app so that users can try to fix any "stuck" widgets, etc., themselves.

For example, if I'm using Gmail and I'm in the middle of writing an e-mail,
if I hit the refresh button I don't expect for the page to come right back
and put me in the position of editing the same e-mail... and I don't think
the users would expect this (what's a website where it does work like
this?).

Another way to think about it: if you try to restore all state when the user
refreshes the page, then they *can't* attempt to reset the app by refreshing
the page... and then what happens if the browser crashes or the app "hangs"
for whatever reason? If its so "smart" that it tries to restore state when
it comes back (and is successful), won't it end up back in a stuck state
(assuming it was "perfect" at its job)? That would be frustrating...

Troy.


On 12 Mar 2007 03:33:55 -0700, Teddy Setiawan <[EMAIL PROTECTED]>
wrote:

   This is not silly question,

I come accross the situation myself when creating online game with flash
8.0.
I try to find the solution , but its seems that you can't controll the
browser in the client .

I'm using the sharedobject to handle this, but it means that you have to
save all the state and the variable.
Since my game don't have many state and variable i guess its ok with the
sharedobject.


I wonder if flex can handle this situation.







------------------------------
Date: Mon, 12 Mar 2007 03:06:14 -0700
To: [email protected]
From: [EMAIL PROTECTED]
Date: Mon, 12 Mar 2007 10:04:19 +0000
Subject: [flexcoders] How to handle the F5 browser refresh for a Flex
application

  Hi All,

This may be a very silly question, but I am stuck on this and can not
find a suitable solution, please advise.

I have an application where the first screen is a login screen, when
a user logs in he is redirected to a diferent view based on the users
login permissions etc. The problem is whenever we hit the F5 browser
button the wrapper file is refreshed and the embeddd swf (flex app)
is reloaded reinitializing all the application variables etc. This
takes the screen view back to the default login screen although the
user is logged and all values are lost.
How can I handle this?
I tried using shared objects but this would meen storing every value
in shared object. Is there any easier way out? Any configuration
change etc. Do we need to disable the F5 key press using javascript
etc. ?

Please advise.

Regards,
Paromita



------------------------------
Get news, entertainment and everything you care about at Live.com. Check
it out! <http://www.live.com/getstarted.aspx+>

Reply via email to