Today I wanted to give appcache a try on one of the apps I’m currently developing. I had never used it before.
My whole app at the time weighs in at around 750kb and this includes both client and server files, including everything in public as well.
So there I do meteor add appcache
and right that instant, I get this on my prompt:
You are using the appcache package but the total size of the
cached resources is 6.0MB.
This is over the recommended maximum of 5 MB and may break your
app in some browsers! See http://docs.meteor.com/#appcache
for more information and fixes.
Alright, so what takes up more than 5MB and needs to be delivered to the client???
The packages that I’ve yet included are:
accounts-google
audit-argument-checks
awatson1978:browser-detection
dburles:collection-helpers
dburles:google-maps
email
fastclick
gadicohen:headers
gadicohen:sitemaps
iron:router
matb33:collection-hooks
meteorhacks:sikka
meteorhacks:unblock
meteor-platform
mizzao:timesync
momentjs:moment
okgrow:iron-router-autoscroll
percolate:synced-cron
reywood:iron-router-ga
rzymek:moment-locale-tr
service-configuration
spiderable
todda00:collection-revisions
underscorestring:underscore.string
Chrome console’s network tab reports a transfer around 967kb in total. Of course that is gzipped. Inspecting further, those assets, uncompressed, may actually be more than 5MB, of which, 1.2MB is jquery alone. DDP, minimongo and blaze take up something like 1.5MB. Iron router and a very select few essential packages take another 1MB.
So there actually is no headroom left for any application code!
So I’m wondering, am I doing something inherently wrong here or is appcache just not applicable to meteor projects the way they are?