LemmyのホームページのJavaScriptが古いまま
モバイルで。
リロードしても変わらない。他のページ(かつてアクセスしたことのないURI)にいってリロードしてからだと、最新になる。
つまりキャッシュが強すぎるのではないか。
code:shell
Sun Mar 8 00:33:17 DST 2020
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 07 Mar 2020 15:33:17 GMT
Content-Type: text/html
Content-Length: 1276
Connection: keep-alive
Vary: Accept-Encoding
last-modified: Fri, 06 Mar 2020 20:09:00 GMT
accept-ranges: bytes
etag: "1b:4fc:5e62addc:0"
content-disposition: inline; filename="index.html"
Expires: Mon, 06 Apr 2020 15:33:17 GMT
Cache-Control: max-age=2592000
Strict-Transport-Security: max-age=63072000
Referrer-Policy: same-origin
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
<!DOCTYPE html>
code:shell
Sun Mar 8 00:34:24 DST 2020
<script type="text/javascript" src="/static/d7753a71-app.js"></script>
キャッシュの変更されてないモバイルでは、/static/d9e5a56f-app.jsを参照している。
code:html
<div id="app"></div>
<script type="text/javascript" src="/static/d9e5a56f-app.js"></script>
ページに表示されているLemmyのバージョンはv0.6.24。↑のcurlで取得してる時はv0.6.31
code:shell
HTTP/1.1 404 Not Found
Server: nginx
Date: Sat, 07 Mar 2020 15:39:26 GMT
Content-Length: 0
Connection: keep-alive
code:shell
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 07 Mar 2020 15:40:51 GMT
Content-Type: application/javascript
Content-Length: 884212
Connection: keep-alive
Vary: Accept-Encoding
last-modified: Fri, 06 Mar 2020 20:09:00 GMT
accept-ranges: bytes
etag: "1c:d7df4:5e62addc:0"
content-disposition: attachment; filename="d7753a71-app.js"
Expires: Mon, 06 Apr 2020 15:40:51 GMT
Cache-Control: max-age=2592000
Strict-Transport-Security: max-age=63072000
Referrer-Policy: same-origin
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
一応JavaScriptファイルのヘッダー見てみたけど、根本的にはルートHTMLのキャッシュが長すぎるってことかねえ。
Lemmyがわざとやっているのか、actix webのデフォルトなのか。
関係なくて、Nginxのレイヤーっぽい。
Lemmy(Actix Web?)が出すヘッダーは全部小文字だけど、Nginxのはキャメルケースになっている。