devpunks / snuggsi

snuggsi ツ - Easy Custom Elements in ~1kB
https://snuggsi.com
MIT License
398 stars 17 forks source link

Issue/30 content encoding #49

Closed snuggs closed 7 years ago

snuggs commented 7 years ago

Fixes #30

In the long term is best to have a setup with nginx, http/2 etc. However can just use app server for time being.

Content Negotiation

File types determinant on accept header.

snuggs commented 7 years ago

@brandondees @tmornini @RobertChristopher using Content Negotiation to determine if request Accept header is a script or not. If so then root returns script file. If brotli available returns *.br otherwise gracefully degrades to *.gz.

Will associate domain name so "Installation" will be merely <script src=//snuggsi.es></script>