globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 605 forks source link

Question -> Size issues using globalize in browser environments #802

Closed JayChandler closed 6 years ago

JayChandler commented 6 years ago

Hi

I have been playing around to get globalizejs working in the browser. It's doing fine but how dou you guys handle the huge download size for all this .json files that need to get loaded?

This file alone has about 2.8 mega bytes uncompressed :/

$.get("iana-tz-data.json", Globalize.loadTimeZone)

Including all the other .json files adds another 700 to 800Kb depending on your needs. All these files need to be loaded on every single request which can cause long loading times especially on mobile devices which have slow connections.

By the way i have minified all my .json files :)

Are there any tipps on that ?

rxaviers commented 6 years ago

Please, use stack overflow for questions