In WebProcess::initializeWebProcess the appcache directory of the cache storage is set from the applicationCacheDirectory parameter that is set in WebContext::ensureProcess. Unluckily this parameter holds the return value of WebContext::applicationCacheDirectory() which returns the current cache directory of the cache storage. So it's basically setting an empty string as the directory, which is wrong. In WebKit1 the appcache directory is set to be the same as for the web databases - "g_get_user_data_dir()/webkit/databases". The same should be done in WebKit2.
Created attachment 112089 [details] Patch
Not sure why it's been done like this in WebKit1 but storing application cache data in a databases directory seems odd. Can we use a new directory for this? At least in WebKit2?
For reference Chromium stores this information for me at ~/.config/chromium/Default/Application Cache.
(In reply to comment #3) > For reference Chromium stores this information for me at ~/.config/chromium/Default/Application Cache. I then propose for application cache directory path to be constructed this way: > g_build_filename(g_get_user_data_dir(), "webkit", "applicationcache", NULL); Once an agreement is made about which name to use, I'll upload a new patch.
(In reply to comment #4) > (In reply to comment #3) > > For reference Chromium stores this information for me at ~/.config/chromium/Default/Application Cache. > > I then propose for application cache directory path to be constructed this way: > > > g_build_filename(g_get_user_data_dir(), "webkit", "applicationcache", NULL); > > Once an agreement is made about which name to use, I'll upload a new patch. Shouldn't it be something like this? g_build_filename(g_get_user_cache_dir(), "webkitgtk", "applications", NULL); or g_build_filename(g_get_user_cache_dir(), "webkitgtk", "applicationcache", NULL);
(In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > For reference Chromium stores this information for me at ~/.config/chromium/Default/Application Cache. > > > > I then propose for application cache directory path to be constructed this way: > > > > > g_build_filename(g_get_user_data_dir(), "webkit", "applicationcache", NULL); > > > > Once an agreement is made about which name to use, I'll upload a new patch. > > Shouldn't it be something like this? > > g_build_filename(g_get_user_cache_dir(), "webkitgtk", "applications", NULL); > > or > > g_build_filename(g_get_user_cache_dir(), "webkitgtk", "applicationcache", NULL); You're right, this sort of data should be put into user's cache directory. Regarding the name of bottom directory, I'd prefer 'applications' or perhaps nothing, simply putting cached data into ~/.cache/webkitgtk (if application cache is the only cached data). Repeating the word 'cache' in the path is not helpful. Just to note, this again shows just how wrong it is that WebKit1 puts appcache into database directory. If there's interest/need, I can open another bug.
(In reply to comment #6) > Just to note, this again shows just how wrong it is that WebKit1 puts appcache into database directory. If there's interest/need, I can open another bug. Yeah, I thnk we should fix both WebKit1 and WebKit2. The name of top-level directory should be "webkitgtk" too, since we no longer pretend to be the only game in town.
Created attachment 113995 [details] Now the appcache directory most likely looks something like ~/.cache/webkitgtk/applications
(In reply to comment #8) > Created an attachment (id=113995) [details] > Now the appcache directory most likely looks something like ~/.cache/webkitgtk/applications Sorry for the long name, mixed up flags when uploading through webkit-patch.
Comment on attachment 113995 [details] Now the appcache directory most likely looks something like ~/.cache/webkitgtk/applications Thanks Zan!
(In reply to comment #10) > (From update of attachment 113995 [details]) > Thanks Zan! Zan do you mind also changing the WebKit2 database directory to relfect the new "webkitgtk" name? I don't think we can in WebKit1, because it's an API break.
Comment on attachment 113995 [details] Now the appcache directory most likely looks something like ~/.cache/webkitgtk/applications Clearing flags on attachment: 113995 Committed r99537: <http://trac.webkit.org/changeset/99537>
All reviewed patches have been landed. Closing bug.