How can I automatically log out of Facebook when I leave the site?
March 22, 2011 6:50 AM   Subscribe

Is there a way to force Facebook to close my session automatically when I navigate away from the site?

So I'm lazy and here is my trivial but annoying issue. The only way I can close a session in Facebook is by choosing Account > Logout. ( I currently do not have the site "Remember Me").

If I do not manually log out, Facebook will maintain my session for some short amount of time and when I return I am still logged in. This is all well and good and most login sites work on a similar principle, I totally understand the tradeoff between convenience and security.

However now that third party sites have hooked into Facebook when I visit certain sites I see the annoying and useless "Facebook Activity" section on the page with a list of things my friends have posted, meaning that I am still logged into Facebook.(Engadget does this, The Onion and who knows else, this is not the "Instant Personalization" feature, btw).

I would like to override or somehow change Facebook's default session time so that when I navigate away from the site it's as if I am logging out. Anyone know how to do this?
posted by jeremias to Computers & Internet (9 answers total) 1 user marked this as a favorite
 
Have you tried blocking cookies from Facebook?
posted by COD at 7:07 AM on March 22, 2011


Best answer: Also, see this recent thread on AskMeFi
posted by COD at 7:11 AM on March 22, 2011


Best answer: You can use private browsing in Chrome or Firefox. Just open your Facebook session in a separate private window and log in there--when you're done you can close it and log out automatically.
posted by Aanidaani at 7:16 AM on March 22, 2011 [3 favorites]


Best answer: The literal interpretation of what you request is not possible due to the way the web works. You are not maintaining any continuous connection to Facebook while you are actively looking at your Facebook window. Facebook only knows you are still there by noticing any of your activity that causes your browser to request further data from Facebook's servers. As long as this happens frequently enough that your login does not time out, you remain logged in. if you were able to shorten your timeout to a minute or two (which you can't), you would find yourself being constantly logged out of Facebook even while using it. What I have described above also prevent Facebook from "knowing" when you have stopped using it. It's not so much a matter of convenience as it is a matter of doing the best they can in what is effectively an asynchronous and stateless (aside from the imperfect solution of cookies) medium.

Aanidaani has a good suggestion. Using the private browsing window will even allow you to keep Facebook open while you browse other sites in your normal browsing window without those site being able to access your Facebook session.
posted by rocketpup at 8:10 AM on March 22, 2011


However now that third party sites have hooked into Facebook when I visit certain sites I see the annoying and useless "Facebook Activity" section on the page with a list of things my friends have posted, meaning that I am still logged into Facebook.(Engadget does this, The Onion and who knows else, this is not the "Instant Personalization" feature, btw).

This may not be very helpful, but there's either a setting in Facebook or a greasemonkey script I've installed (I can't remember which, and I can't seem to find it!) that prevents me from seeing any of this stuff on third-party sites. I may have facebook friends whose "likes" show up on partnered sites that I also visit while logged in to facebook, but I never see them.
posted by rtha at 8:54 AM on March 22, 2011


I think the private/anonymous mode in Chrome would work.
posted by WizKid at 9:21 AM on March 22, 2011


Response by poster: Thanks all. Rocketpup you have a good point, I was thinking there might be a Javascript way to connect the event of leaving Facebook to the action of logging out.

I'll likely be exploring options for preventing 3rd party sites from accessing Facebook at all.
posted by jeremias at 9:38 AM on March 22, 2011


Oh, and if you are truly lazy (like me) you can set up Chrome to open in Incognito Mode by default, on a Windows XP machine anyway. Create a shortcut to Chrome, and right click to choose Properties. Under the Shortcut tab, you will see a field for Target which points to the application. At the very end of all that (after "...\chrome.exe", type a space and then" -incognio". So it looks something like:

"C:\....\Google\Chrome\Application\chrome.exe" -incognito

Then, when you click on that shortcut, it will open in Incognito mode automatically.
posted by This_Will_Be_Good at 9:50 AM on March 22, 2011


What webbrowser do you use?
posted by jeffamaphone at 9:52 AM on March 22, 2011


« Older Jobs in Beijing   |   Confidence boosters Newer »
This thread is closed to new comments.