Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable gzip compression for CDN #1306

Closed
Koc opened this issue Jan 22, 2013 · 9 comments
Closed

Enable gzip compression for CDN #1306

Koc opened this issue Jan 22, 2013 · 9 comments
Labels
good first issue Good for newcomers

Comments

@Koc
Copy link
Contributor

Koc commented Jan 22, 2013

From PageSpeed:

Сжатие следующих ресурсов посредством gzip позволит уменьшить их размер для переноса на 140.9Кб (на 75%).

Сжатие http://cdn.leafletjs.com/leaflet-0.4.4/leaflet-src.js позволит уменьшить размер на 134.7Кб (на 75%).
Сжатие http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.css позволит уменьшить размер на 6.1Кб (на 75%).

@Koc
Copy link
Contributor Author

Koc commented Jan 23, 2013

Там же:

Следующие кэшируемые ресурсы имеют короткий срок действия. В дальнейшем следует указать для следующих ресурсов срок действия не менее недели:

http://cdn.leafletjs.com/leaflet-0.4.4/leaflet-src.js (не указан срок истечения действия)
http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.css (не указан срок истечения действия)

@mourner
Copy link
Member

mourner commented Jan 23, 2013

Во-первых, Amazon CloudFront не поддерживает в нужном виде gzip-компрессию. Если она нужна — пользуйтесь другим CDN. Во-вторых, в более новых версиях срок кеширования уже настроен.

@mourner mourner closed this as completed Jan 23, 2013
@Koc
Copy link
Contributor Author

Koc commented Jan 23, 2013

Я писал Яндексу, они не хотят добавлять либу ссылаясь на то, что она непопулярная. Привел в пример им викимапию и форсквер - молчат.

@mourner
Copy link
Member

mourner commented Jan 23, 2013

Они лукавят, Лифлет популярнее и лучше Yandex Maps API, вот им и завидно. :)
Посмотри на http://cdnjs.com/, они принимают.

@kynan
Copy link

kynan commented Jan 31, 2016

Could you explain this in English please? Why was this closed? There is still no gzip compression for the resources on the CDN afaict.

@danzel
Copy link
Member

danzel commented Feb 1, 2016

Use google translate, mourner says to use cdnjs which has gzip compression.

@mourner
Copy link
Member

mourner commented Feb 1, 2016

Actually I think this should be revisited. Initially I worried that CloudFront doesn't support automatically gzipping and serving based on content headers. But now that all browsers/clients support gzip, we should just gzip by default.

@mourner mourner reopened this Feb 1, 2016
@mourner mourner added feature good first issue Good for newcomers and removed feature labels Feb 1, 2016
@innerspirit
Copy link

Hi, I saw this issue on http://up-for-grabs.net/ and wanted to give it a shot, see if I can help you guys out.

Does this refer to the leaflet website itself? Anyhow, I have not been able to find the code for the backend, just the frontend, and this looks like either a backend issue or a cdn configuration issue.

@mourner
Copy link
Member

mourner commented Sep 27, 2016

We switched our CDN to unpkg.com, so this can be considered fixed. http://leafletjs.com/download.html

@mourner mourner closed this as completed Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants