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

Serving files via HTTP2 #673

Open
danielcompton opened this issue Mar 21, 2018 · 4 comments
Open

Serving files via HTTP2 #673

danielcompton opened this issue Mar 21, 2018 · 4 comments

Comments

@danielcompton
Copy link
Contributor

danielcompton commented Mar 21, 2018

I think using HTTP2 would greatly improve the page load performance of projects using Figwheel. Anecdotal reports on Clojurians also suggest this is the case for ClojureScript dev projects. With HTTP 1.1, browsers will only open up to 6 requests at a time to a single origin. This means that lots of the static file requests end up blocked, waiting in line. With HTTP2, this wait would be eliminated as the browser can make many requests over a single stream.

It would be interesting to see what would be involved for Figwheel to serve assets over HTTP2, and to quantify the performance improvements. It would need to be an opt-in thing, because HTTP2 requires SSL, even in localhost, and setting that up can be a bit of a pain.

@bhauman
Copy link
Owner

bhauman commented Apr 13, 2018

In the new version of the figwheel repl/server I'm using jetty so this certainly seems possible, SSL is also another possibility.

@danielcompton
Copy link
Contributor Author

danielcompton commented Apr 13, 2018

Another idea I had would be to somehow serve :optimisations :white-space for initial page load (or just concatenate the files manually), but for all incremental reloads, serve only the updated files. That sounds pretty tricky though.

@bhauman
Copy link
Owner

bhauman commented Apr 13, 2018

Yeah I thought about that a while back and it is very tricky.

@iambumblehead
Copy link

iambumblehead commented Apr 18, 2018

Respectfully, I hope figwheel gains the ability to start an https service.

In the node ecosystem there are various key-generating tools such as this one. Throw-away keys are fine for development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants