Is there CDN for polymer elements?

前端 未结 6 1616
终归单人心
终归单人心 2020-12-15 05:00

I would like to know if there are any CDNs for polymer elements, since you have to always download the elements and It would be more convinient to import it via cdn. Can\'t

6条回答
  •  执笔经年
    2020-12-15 05:55

    rawgit option

    You would have to manage some dependencies manually since core-ajax.html returns 404 on polymer.html. Also rawgit.com cache is set to only 5 min (cache-control:max-age=300). 5 min cache is fine for version control, but it should be more for CDN (https://rawgit.com/Polymer/core-ajax/0.4.1/core-xhr.html). Also files are not minified.

    vulcanize option

    Probably best option before http/2 release. You would have to spend some time with configuration and integration into your build process. Also you don't have any CDN benefits (no data cost, already cached resources from third party domains.)

    conclusion

    There will be some CDN with minified polymer versions and long expires header on http/2 release. But I don't know about any right now.

提交回复
热议问题