What about this: writes to a.mydomain.com from a page with www.mydomain.com in the address bar count towards the quota for both a.mydomain.com and www.mydomain.com.
You'd have to store the other domains your page has written to in its own local storage area, but it doesn't seem to me like the book keeping would be that complicated.
You could use a coarse rule of all data in a.mydomain.com counts, and use a larger quota of n * per-domain-limit.
You could visit as many legit-site.tumblr.com addresses as you want with this rule.
It's too complicated. I don't think this is a real problem. Better to just evict a random subdomain entirely (or on an LRU scheme). After all, just like cookies, there's no guarantee the localStore will stick around, so any normal site needs to deal with this anyhow.
You'd have to store the other domains your page has written to in its own local storage area, but it doesn't seem to me like the book keeping would be that complicated.
You could use a coarse rule of all data in a.mydomain.com counts, and use a larger quota of n * per-domain-limit.
You could visit as many legit-site.tumblr.com addresses as you want with this rule.