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

Add keep-alive-header #107

Closed
necolas opened this issue Nov 30, 2012 · 1 comment
Closed

Add keep-alive-header #107

necolas opened this issue Nov 30, 2012 · 1 comment
Labels

Comments

@necolas
Copy link
Member

necolas commented Nov 30, 2012

Original issue/discussion - h5bp/html5-boilerplate#1115 - was apache-specific. Moving to this repo following the move of the .htaccess.

@drublic says:

I stumbled over keep-alive a view times lately while checking Google Page-Speed for some advice for a specific project.

Keep-alive is an HTTP feature which allows the server to send multiple requests through one TCP-connection as far as I understood. This improves performance up to 50% according to the Apache config docu. @getify states in #28 that a connection with keep-alive may be 20-30% faster.

From my experience and this SO question it seems like the HTTP header is set in a server-configuration and you can't change it easily via .htaccess.

Today I found this new answer on the SO question from above which describes that it is possible to use Header set Connection keep-alive in the .htaccess to control the behavior of this.

This works for me. I've tested this in two projects now, one of them is my blog. The request-header "Connection" is set to "keep-alive" now and Google Page-Speed does not show this anymore as "to be done". Here is a screenshot of the headers.

I'd suggest adding this to the .htaccess file as it seems to improve performance and I've not encountered any problem with setting this header.

Looking forward to your feedback!

@alrra
Copy link
Member

alrra commented Apr 19, 2013

Closing this one for now.

@alrra alrra closed this as completed Apr 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants