HistoryBlock icon indicating copy to clipboard operation
HistoryBlock copied to clipboard

Add support for blocking localStorage

Open kainsavage opened this issue 8 years ago • 0 comments

Similar to #6

MDN article

  1. Listen on page visit
  2. Capture timestamp when blacklist-hit occurs
  3. When blacklist processing occurs (tab closes, etc), go back and remove localStorage entries from that timestamp onward

This implementation may have collateral damage (if user opens blacklisted tab, then opens a bunch of non-blacklisted tabs, for instance), but unlike destroying cache entries, clearing localStorage collateral damage is a problem as many sites now rely on it for user authentication (and other state). For example, user opens a blacklisted tab, then opens a non-blacklisted tab and logs in, then closes the blacklisted tab - this would cause the localStorage entries for the non-blacklisted tab to be deleted and the user would be 'logged out' even though the page looks like the user is logged in.

Should be optional and the default is 'off'. Additionally, there should be very clear and direct confirmation required before turning this feature 'on' as corner cases like the one outlined above would very confusing to a user without technical knowledge of the implementation.

kainsavage avatar Jul 06 '17 16:07 kainsavage