I'm not sure why shift reloading would make the cache grow since the
same page should load exactly the same modules - if that's not the
case that points at a bug somewhere.
That said since there are a potentially infinite amount of
modules/gadgets, many of which are rarely used that can be loaded in
localStorage it could be a good idea to control this somehow - e.g.
only cache commonly loaded modules . Ori have you thought much about
this approach? I could imagine two approaches:
1) only caching modules loaded by startup module
2) keeping a counter for each module name to count how many times it
loads and when it hits a certain threshold only then the css/js is
cached. For instance there is not much point in caching a bit of JS
that runs on
3) a mixture of these 2 approaches
I was just reminded also of an old talk I went to [1] which had
awesome ideas for maximising storage that might be worth exploring.
Since JavaScript uses UTF-16 for text encoding the idea was
essentially to convert to UTF-8/ASCII to get up to 50% compression
ratio. There were also ideas about bit shifting base64. Worth
exploring and making this even more of a dangerous experiment?!?! :D
[1]
http://lanyrd.com/2012/londonjs-10/srdzy/
On Thu, Nov 7, 2013 at 8:38 AM, Chris McMahon <cmcmahon(a)wikimedia.org> wrote:
On Thu, Nov 7, 2013 at 8:05 AM, Jon Robson
<jdlrobson(a)gmail.com> wrote:
From personal experience don't touch cache
manifests with a barge pole...
Bear in mind the majority of browsers provide at least 5mb of local storage
and we are talking about caching a few kB at most of minified
JavaScript....
On 7 Nov 2013 00:35, "Daniel Friesen" <daniel(a)nadir-seen-fire.com>
wrote:
What I'm seeing in Chromium/Chrome is that when I invoke VisualEditor one
time localStorage hits ~3.5MB immediately.
Hit shift-reload a few times in quick succession and it's pretty easy to
max out localStorage for Chromium at 5.xMB. Default for Chrome seems to be
10MB.
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
Jon Robson
http://jonrobson.me.uk
@rakugojon