In the past few days, I have been experimenting with the
HTML5 offline web application cache , doing tests and studying browser behavior in boundary situations.
One of these experiments is related to the maximum cache size quota.
Two weeks ago I wrote about generating and submitting an application manifest using ASP.NET MVC. It uses the same code, but adding hundreds of 7 MB of PDF files to the cache.
')
public ActionResult Manifest() { var cacheResources = new List<string>(); var n = 300;
At first, I tried to add 1000 PDF files to the cache, but the browser generated an error: Chrome reported exceeding the quota.
Lowering the number of files several times, I found this limit. We were able to add 300 PDF files to the cache without receiving an error about exceeding the quota.
Looking at
chrome: // appcache-internals / , I can make sure that the cache size is 2.2 gigabytes for a single web application.

As a user, I didn’t even know that a website opened in a browser downloads a suspicious amount of data in the background. Neither Chrome (17.0.963.83), nor any other desktop browser known to me warns about it. Although it seems to me that downloading and storing such a large amount of information on my computer should be done with my permission.
What else I noticed is that all other sites after the quota has been exhausted can no longer write anything to the cache. I am sure that such an approach "who first got up, that and sneakers" will cause some discontent in the future.
To solve this problem, you can use the applicationCache API to track down quota errors and give the user a message with the advice to open
chrome: // appcache-internals / and delete the caches of old web applications to make room for the new one. It looks rather awkward; can't the browser do this in a more elegant way?
