Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ger19

macrumors regular
Original poster
Sep 30, 2022
190
227
I want to open Chrome on my Mac in incognito mode. I know how to get an incognito window, but I'd like to be able to have it open in an incognito mode by default. I do this because I only use Chrome to read my email and I don't like how it keeps me logged in when I close the window if I don't use it in incognito mode. I've read some information on doing this on a Mac and it seems to require a script, which I've tried and could not get it to work. I’m not sure how to proceed. It seems like it should be possible, but I can’t figure it out.
 
There is no way that’s not invasive. Firefox or Brave will allow for privacy mode all the time and even clear cookies/cache on edit if you want.
 
  • Like
Reactions: ger19
There is no way that’s not invasive. Firefox or Brave will allow for privacy mode all the time and even clear cookies/cache on edit if you want.
How invasive? I know how to do some programming and run macros, etc. I’ve tried creating a script but I can’t get that to work. Probably because I’m not familiar with Mac. I’ve mostly used Windows in the past.
 
Got it! The syntax was different, but I finally figured it out (trial and error).
 
Bonus :) "Chrome clean" AppleScript
AppleScript:
--Deletes all folders and subfolders from ~/Library/Application Support/Google/Chrome/, except Default.
do shell script "find ~/Library/Application\\ Support/Google/Chrome/* ! -name 'Default' -type d -exec rm -rf {} +"
--Deletes all files from ~/Library/Application Support/Google/Chrome/, except Local State, First Run, Last Version, Bookmarks, Preferences and Secure Preferences.
do shell script "find ~/Library/Application\\ Support/Google/Chrome/ ! -name 'First Run' ! -name 'Last Version' ! -name 'Local State' ! -name 'Bookmarks' ! -name 'Preferences' ! -name 'Secure Preferences' -type f -exec rm -f {} + "
--Deletes ~/Library/Caches/Google/Chrome
do shell script "rm -rf ~/Library/Caches/Google/Chrome"
--Deletes ~/Library/Saved Application State/com.google.Chrome.savedState
do shell script "rm -rf ~/Library/Saved\\ Application\\ State/com.google.Chrome.savedState"

The lines that start with -- are just comments explaining what the next line does.
 
  • Like
Reactions: AnonMac50 and ger19
I want to open Chrome on my Mac in incognito mode. I know how to get an incognito window, but I'd like to be able to have it open in an incognito mode by default. I do this because I only use Chrome to read my email and I don't like how it keeps me logged in when I close the window if I don't use it in incognito mode. I've read some information on doing this on a Mac and it seems to require a script, which I've tried and could not get it to work. I’m not sure how to proceed. It seems like it should be possible, but I can’t figure it out.

All web browsers have options for what to clear, when you close their window.
 
All web browsers have options for what to clear, when you close their window.
Understood, but I’m a creature of habit. On my Windows machine, I used Chrome and opened it in incognito mode to read my email. Just wanted to keep things similar as I moved over to my Mac. I really should just find another email that’s not so intrusive. I’m sure the only reason they want to keep us logged in is to track our browsing behavior and extract more value from our data. Ugh.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.