brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.47k stars 2.26k forks source link

Clear cache when idle #869

Open tildelowengrimm opened 6 years ago

tildelowengrimm commented 6 years ago

Cache provides performance improvements, but generally doesn't store state that matters to users. However, it's a great side-channel for setting state on a client machine. We could pro-actively purge cache state from tabs which have been idle for a while to reduce the scope of cache-based attacks.

NumDeP commented 5 years ago

+1 This in the popular browsers is usually a separate feature provided by an extension to make the browser state more responsive again. It's brilliant that you're going to implement it as just a random feature as a privacy concern but could potentially have other benefits to a user as well.

Hypothetically, if a user had 80 tabs open which resulted in 2+GBs of physical memory and a bit of swap being used-up, could your implementation of pro-active purging reduce this as though the browser was restarted and the 80 tabs were loaded again from bookmarks?

onmyouji commented 5 years ago

+1 It will be great if you can also add option to clear cache at regular interval (like in uMatrix)

image 5

czhang03 commented 5 years ago

+1 the only reason I can't leave firefox is that I cannot install cookie auto-delete on my mobile. please implement this feature so that I can enjoy brave.