Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Create session-only cookies in Safari in 10.5.6 Web Browsers
For the paranoid, the pornsurfer, as well as anyone with a not-undue concern about online tracking, it is useful to be able to automatically delete all cookies when quitting one's browser.

For most of the history of Safari, although the browser did not provide a way of erasing all cookies at shutdown, the facility could be emulated by setting one's ~/Library » Cookies » cookies.plist file to "read only" (see this hint). Since cookies are stored in memory until the browser shuts down, the result was a perfectly normal browser session with no cookies carried to the next session.

This ability went away with 10.5, as a read-only cookie file caused random issues at most sites requiring a login cookie. There was no option but to reset the cookie.plist file to read/write, and delete them by hand every now and then.

The problem has been resolved in 10.5.6, but the technique for achieving it is slightly different -- you now must set the containing folder to read-only, not the file. Read on for a detailed walkthrough, if you need it...

The complete recipe is:
  1. Launch Safari, then open its Preferences and select the Security tab.
  2. Click the Show Cookies button, then click Remove All. (Alternatively, keep any cookies you really want), then click Done.
  3. Quit Safari.
  4. In the Finder, navigate to ~/Library.
  5. Select the folder Cookies and press Command-I to open the Get Info window.
  6. Under Sharing and Permissions, authenticate by clicking the padlock icon.
  7. Set the privilege next to your username to Read Only, and make sure it is No Access for all other users.
  8. Close the Get Info window.
Congratulations, you now have session-only cookies once again.
    •    
  • Currently 1.90 / 5
  You rated: 3 / 5 (10 votes cast)
 
[19,576 views]  

10.5: Create session-only cookies in Safari in 10.5.6 | 9 comments | Create New Account
Click here to return to the '10.5: Create session-only cookies in Safari in 10.5.6' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Create session-only cookies in Safari in 10.5.6
Authored by: patpro on Jan 14, '09 08:22:49AM

I don't need this hint to have "shorter than a session" cookie lifetime!
Due to a safari bug on 10.5.6, cookies are handled so badly that many people consider switching to firefox. It's a real pain in the a**.
I login on a web site, browse another one, come back to the first, and have to login again. Apple support forums are full of people struggling with this issue.

---
http://www.patpro.net/



[ Reply to This | # ]
10.5: Create session-only cookies in Safari in 10.5.6
Authored by: Sesquipedalian on Jan 14, '09 09:11:58AM

I fail to see how that contributes anything to discussion of this hint. While it is surely very annoying to be faced with such horrendous difficulties as you are experiencing, there are more appropriate places to vent your frustration.



[ Reply to This | # ]
10.5: Create session-only cookies in Safari in 10.5.6
Authored by: simply258 on Jan 14, '09 10:27:43AM

patpro I had the same problem. Fixed it by downloading the Safari installer, deleting Safari.app in Applications, reinstalling Safari then restarting.



[ Reply to This | # ]
10.5: Create session-only cookies in Safari in 10.5.6
Authored by: Ronald Lanham on Jan 14, '09 11:36:52AM
I've found that by using Cocoa Cookies (freeware - cookie manager)...

Cocoa Cookies website
5 stars at MacUpdate

...it is possible to have the best-of-both-worlds.

That is... you can selectively keep those cookies that are necessary to keep for login in accounts (i.e. forums, banks, etc.) and easily be able to delete all unwanted cookies with a single click.

Locking cookies or deleting necessary cookies can end up with unwanted results.

[ Reply to This | # ]
10.5: Create session-only cookies in Safari in 10.5.6
Authored by: Helge33 on Mar 30, '10 12:35:26AM

Why not using a modern full featured web browser like OmniWeb? No need for extra plugins because everything is already build in:
- site specific settings for cookies, java script permisison etc.
- a decent ad filtering

I could not recognize any really useful improvements for Safari since V3 except for some eye-candy.



[ Reply to This | # ]
10.5: Create session-only cookies in Safari in 10.5.6
Authored by: asmeurer on Jan 14, '09 01:09:28PM

If you just want to do this once in a while, while keeping your main cookies, you could just use the guest account.



[ Reply to This | # ]
10.5: Create session-only cookies in Safari in 10.5.6
Authored by: firthy on Jan 15, '09 05:41:38AM

Also, isn't this exactly what the "Private Browsing..." item in the File menu is for--for browsing pr0n without a trace?



[ Reply to This | # ]
10.5: Create session-only cookies in Safari in 10.5.6
Authored by: Kevvin7 on Jan 15, '09 12:11:35PM

To address a couple of the questions in comments here:

1. Cocoa Cookies is a cookie management tool and is probably great for people
who want to -manage- their cookies manually. This hint is for people who
just want them all to go away without needing to think about it. Automatically. Always.
In practice, this is not as draconian an idea as it may sound.

2. The password manager has pretty completely obviated any need I ever
had for persistent login cookies. ymmv, obviously.

3. This is -not- the equivalent of "private browsing". Private browsing
eliminates history and password information in addition to cookies.
This hint is designed to reduce the amount of data sent to external
sites. History and form information kept on the local machine is an entirely
different issue.



[ Reply to This | # ]
10.5: Create session-only cookies in Safari in 10.5.6
Authored by: Syed on Mar 29, '10 06:31:29PM

Hello, does anyone know how to achieve session only cookies programatically? I see that financial sites such as bank of America expire my session cookies but other sites, such as aa.com, do not expire my cookies. So, BofA has figured out how to write session cookies on the Mac OS. Can anyone explain how to do this via code.



[ Reply to This | # ]