by stevekemp · 7y ago · 0 comments
# Open a new firefox instance, with a temporary profile
function firefox_temp() {
dir=$(mktemp -d)
echo "Profile directory: ${dir}"
firefox --new-instance --profile ${dir}
echo "Cleaning up .."
rm -rf ${dir}
}
I'm not familiar with Chrome, but perhaps there is a similar "profile-directory" argument you can point to a temporary location? open -Fna /Applications/Google\ Chrome.app \
--args --user-data-dir=/my_temp_profile_dir/my_tmp_profile
If you copy an existing profile to `my_tmp_profile` chrome will use that, otherwise it behaves like a new setup.But this way I'm very certain extensions, history, local-storage, etc, are absolutely not available.
(To be honest I tend to use this mostly avoid caching, and other things. Useful when you're testing redirects and new designs.)