Leaflet CDN caching

123 views
Skip to first unread message

Gregers Gram Rygg

unread,
Nov 29, 2012, 9:16:32 AM11/29/12
to leafl...@googlegroups.com
Hi,

First, thanks for making a nice and small maps api!

Also nice to host the files on a CDN, but the configuration isn't optimal for performance:
- GZip is turned off
- Using ETag will cause the client to send a request each time, and has other issues. It's better to use Expires with a date far ahead in time. If using Expires, ETag should be turned off.

We're not using the CDN. Just wanted to let you know about the performance issues.

Cheers,
Gregers

Vladimir Agafonkin

unread,
Nov 29, 2012, 9:37:29 AM11/29/12
to leafl...@googlegroups.com, Jason Sanford
Hi Gregers,

Thanks for the suggestion! I think I set the Expires header for all files of the 0.4.5 release, but I'll check again.
Regarding GZip, unfortunately Amazon CloudFront doesn't support it fully. It can serve gzipped content but it can't serve gzip or non-gzip depending on request headers on the same URL.


2012/11/29 Gregers Gram Rygg <grege...@gmail.com>

--
 
 
 



--
Vladimir Agafonkin
http://agafonkin.com/en
+380 (93) 745 44 61

Gregers Gram Rygg

unread,
Nov 30, 2012, 7:10:18 AM11/30/12
to leafl...@googlegroups.com, Jason Sanford
Hi Vladimir,

Thanks for the info. I have no experience with CloudFront, but it seems to be possible if you use CloudFront as a reverse proxy (origin server) to a server that supports gzip and use the Vary: Accept-Encoding header.

Cheers,
Gregers


--
 
 
 

Reply all
Reply to author
Forward
0 new messages