Building an online interactive map with leaflet and some heavy layers with my spatial data in topojson format. I have been reading about gzip but I am still uncertain how to configure it.

Do I need to:

  1. gzip the files used for my leaflet map myself in my terminal ?
  2. change my javascript code so that instead of calling 1966.topojson I call 1966.topojson.gz ?
  3. change the apache server (2nd generation) in some way?

Not sure how to change it so that it can send topojson files.

Is there any good tutorial around for that?

closed as too broad by PolyGeo Aug 19 '17 at 20:31

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


You do not compress them manually yourself, instead you configure Apache to compress them on the fly when browsers request/allow that. See eg https://stackoverflow.com/questions/19254859/does-apache-2-gzip-json-output-by-default

Not the answer you're looking for? Browse other questions tagged or ask your own question.