GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add note about browsers and HTTP/2 · nodejs/node@1f420fc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • http2.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/http2.md‎

Copy file name to clipboardExpand all lines: doc/api/http2.md
+16-4Lines changed: 16 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ be emitted either by client-side code or server-side code.
2424

2525
### Server-side example
2626

27-
The following illustrates a simple, plain-text HTTP/2 server using the
28-
Core API:
27+
The following illustrates a simple HTTP/2 server using the Core API.
28+
Since there are no browsers known that support
29+
[unencrypted HTTP/2][HTTP/2 Unencrypted], the use of
30+
[`http2.createSecureServer()`][] is necessary when communicating
31+
with browser clients.
2932

3033
```js
3134
const http2 = require('http2');
@@ -253,7 +256,7 @@ and would instead register a handler for the `'stream'` event emitted by the
253256
```js
254257
const http2 = require('http2');
255258

256-
// Create a plain-text HTTP/2 server
259+
// Create an unencrypted HTTP/2 server
257260
const server = http2.createServer();
258261

259262
server.on('stream', (stream, headers) => {
@@ -1735,10 +1738,18 @@ changes:
17351738
Returns a `net.Server` instance that creates and manages `Http2Session`
17361739
instances.
17371740

1741+
Since there are no browsers known that support
1742+
[unencrypted HTTP/2][HTTP/2 Unencrypted], the use of
1743+
[`http2.createSecureServer()`][] is necessary when communicating
1744+
with browser clients.
1745+
17381746
```js
17391747
const http2 = require('http2');
17401748

1741-
// Create a plain-text HTTP/2 server
1749+
// Create an unencrypted HTTP/2 server.
1750+
// Since there are no browsers known that support
1751+
// unencrypted HTTP/2, the use of `http2.createSecureServer()`
1752+
// is necessary when communicating with browser clients.
17421753
const server = http2.createServer();
17431754

17441755
server.on('stream', (stream, headers) => {
@@ -3093,6 +3104,7 @@ following additional properties:
30933104
[Compatibility API]: #http2_compatibility_api
30943105
[HTTP/1]: http.html
30953106
[HTTP/2]: https://tools.ietf.org/html/rfc7540
3107+
[HTTP/2 Unencrypted]: https://http2.github.io/faq/#does-http2-require-encryption
30963108
[HTTP2 Headers Object]: #http2_headers_object
30973109
[HTTP2 Settings Object]: #http2_settings_object
30983110
[HTTPS]: https.html

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.