Skip to content

Commit

Permalink
Never save cahce for private windows
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Oct 29, 2024
1 parent afa7baa commit 0d809b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions webextensions/background/background-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,11 @@ async function cacheTree(windowId, triggers) {
win.lastWindowCacheOwner = getWindowCacheOwner(windowId);
if (!win.lastWindowCacheOwner)
return;
const firstTab = Tab.getFirstTab(windowId);
if (firstTab.incognito) { // never save cache for incognito windows
updateWindowCache(win.lastWindowCacheOwner, Constants.kWINDOW_STATE_CACHED_TABS, null);
return;
}
log('cacheTree for window ', windowId, triggers/*{ stack: configs.debug && new Error().stack }*/);
updateWindowCache(win.lastWindowCacheOwner, Constants.kWINDOW_STATE_CACHED_TABS, {
version: kCONTENTS_VERSION,
Expand Down

0 comments on commit 0d809b8

Please sign in to comment.