|
Posted by Rik Wasmus on 01/01/08 14:11
On Tue, 01 Jan 2008 12:05:34 +0100, Derek Fountain
<nomail@hursley.ibm.com> wrote:
> I've got a function that builds a webpage containing a flash animation.
> As the page goes to the browser, the browser sees the link to the
> embedded FLV file and opens a new connection to retrieve it. A moment
> later the page download is completed, and a few seconds after that,
> depending on the user's connection speed, the FLV download completes and
> the use has the content. All fine.
>
> The issue comes if the user receives the page, but then hits the
> 'logout' link on it before the FLV has completely downloaded. The
> browser goes to fetch the logout page (which deletes the session, etc.)
> but it seems that since there's still a connection open for the FLV
> stream something odd happens. It appears the session doesn't get
> deleted. If, having received the logout page, the user hits their back
> button, they go back to the previous page and it all still works - they
> haven't been logged out.
>
> This doesn't happen every time, so I'm guessing it's a race condition.
> Can anyone explain what's happening and what I can do about it?
1. If the FLV file is served/created/altered with PHP, get all session
variables you need straight at the beginning, and call
session_write_close() immediatelly after it before doing any other work.
2. If it's not served with PHP, there is another problem, an we'd like to
see your logout code.
--
Rik Wasmus
[Back to original message]
|