• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to handle Session

 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
I had developed an application with Frames, maintaining the sessions for different users.If the user closes the browser without clicking logout,iam calling logout page on unload event on frame.The problem is when the user refresh the frames page,the unload event is called and logout screen is displayed which is not to be happened.How to overcome this problem?Pls suggest me.
Thanks in Advance.
Ravi
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i suggest that the unload-action is also called by "refresh", before the refreshed site is loaded.
 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi heiner weilandt,
Please can you elaborate on this and tell me what to do?
Ravi
 
heiner weilandt
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry, i don't know.
but why you don't try it with an timeout of your session ?
then you can forget the unload-event. when the timeout (user don't make any request till five minute or something else....) is fired, you can delete your session.
ciao
heiner :roll:
 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi heiner weilandt,
Thanks for ur reply.
As session times out,iam removing the session.But i want to invalidate the session when the user closes the window insteading of clicking logout button.
Ravi
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ravi
There is no easy way to let the server know that the client has closed their browser. The client doesn't make any kind of call to the server to do this, it just does it. You might try something with a small unseen applet that lets the server know that the applet has been stopped - that's about the only thing I can think of and its not a sure thing either.
Did you try to do a search for this? It's been asked quite a few times before.
 
We're all out of roofs. But we still have tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic