473,800 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

session destroy with onunload event brower

oranoos3000
107 New Member
hi
i'd like to destroy sessions for logging out logged in user
with onuload event from brower

i wrote a script that with onunload event brower a function is ran that is writen with jquery and inside this function i send a request for a php file that only destroy session but unfortunately my user is'nt logged out

information logged in users that is saved in database is consist of username , ip address

thanks alot
sepideh mohseni
Jun 15 '10 #1
1 3083
johny10151981
1,059 Top Contributor
if you simply delete cookie the user wont be able to login with its current session (this is probably not a good idea. Cause it may will create lots of garbage in your server).
now your situation:
i think you are calling logout.php(or anything like that) using ajax. are you sending any data as post or get to logout.php. now try this first login and then try to call the logout page directly from browser to check if your logout.php is working properly.
if it use post method try to simple page by which you can send post data and check your logout.php
Jun 16 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
8571
by: Andoni | last post by:
Hi, I am only writing for IE 5.5+ so no need for compatibility at all ;-) I am trying to get my users to logoff which they finish on a particular page. This is no problem (or should be no problem) as I can just put a location.replace('http://www.mysite.com/html/logoff.jsp'); into the onUnload event of the page they always finish on. This should fire when they click the X in the corner (my app. is in a popup window) instead of hitting...
4
2516
by: Roy Wang | last post by:
Hi everyone, I want to assign a url to the img.src attribute using javascript so that browser will send a request according to the url, which is all i want. The tricky stuff is i want to do it in Page OnUnload event handler which is called just before the browser is starting to unload the document(ESPECIALLY when the user choose to close the browser window to fire the event).
5
5021
by: Viktor Popov | last post by:
Hi, Iwould like to do that. Is it possible because I can't do it? in test.aspx file: <body onunload="signout()"> in test aspx.cs : void private signout() { HttpContext.Current.Cache.Remove(Session.ToString());
5
2718
by: jackchang1 | last post by:
I have an application that will submit the form when the page is closed (through onunload event), and it works fine in IE6. But it doesn't work in FireFox, and no data is sent. It seems to me that FireFox doesn't let the onunload event ends before the window is closed. Or is it an form submit issue in the onunload event? Thanks!
2
2430
by: tuktik | last post by:
Hello everyone, I want to notify user if he modifies some data in the form and leaves the page without saving. So I use onunload event to call ajax file to check if the data in the form elements are different from the one in the database, and make an alert message to notify user. I found that my ajax script have not finished the process but the browser already loaded a new page and the user will never see the alert message. Are there some...
6
1521
by: boyindie86 | last post by:
HI I am trying to use the window onunload event, so that when a user closes the window it will go and delete a text file that it uses to read contents from, so to stop my server filling up with loads of text files. But i have problem that it will go and delete a file if i push a button as it considers moving away from that page as an onunload event. i am trying to write the function so that it can detect wether the button has been...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10276
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10035
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7580
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6813
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.