Slide 7
Slide 7 text
具体的にどういう応答?
● Link: ヘッダで preload,
preconnect などの対象を返す
● CSP とも一緒に使える
103 Early Hint
Link: ; rel=preload; as=image
103 Early Hint
Content-Security-Policy: style-src: self;
Link: ; rel=preload; as=style
200 OK
Content-Type: text/html
...
sugi@tempest:~% curl -v http://127.0.0.1:8000/
* Trying 127.0.0.1:8000...
* Connected to 127.0.0.1 (127.0.0.1) port 8000
* using HTTP/1.x
> GET / HTTP/1.1
> Host: 127.0.0.1:8000
> User-Agent: curl/8.11.0
> Accept: */*
>
* Request completely sent off
< HTTP/2 103 Early Hints
< Link:
;rel=preload;as=style,;rel=preload;as
=script
<
< HTTP/2 103 Early Hints
< Link: ;rel=preload;as=image
<
< HTTP/2 200 OK
< Connection: close
< Content-Type: text/plain
<
Hello, World!
time is 2024-12-12 10:13:13 +0900
* shutting down connection #0