web関連

警告「Application Cache is deprecated in non-secure contexts, … 」

警告「Application Cache is deprecated in non-secure contexts, … 」

とあるサイトで出た警告、気になったのでメモ

webサイトをSSL化したら出なくなった。

以下、実際に出てた警告
「Application Cacheは廃止予定なんでHTTPSに移行して最終的にはService Workersを使ってください」って言ってる(google翻訳)

smartphoto.min.js:128 [Deprecation] Application Cache is deprecated in non-secure contexts, and will be restricted to secure contexts in M69, around September 2018. Please consider migrating your application to HTTPS, and eventually shifting over to Service Workers. See https://goo.gl/rStTGz for more details.

HTML5で「Application Cache」というブラウザにキャッシュさせる機能があるみたい

Firefoxはバージョン62以降は「Application Cache」をSSL化されてないサイトでは使えないみたいっすね
chromeはサポートを終了しましたって書いてあった。

▼Application Cache が安全でないサイトでは使用できなくなりました
https://www.fxsitecompat.com/ja/docs/2018/application-cache-can-no-longer-be-used-on-insecure-sites/

現在は非推奨で「Service Workers」を使うのが推奨されているらしい

参考

▼HTML5のApplication Cacheを使う
https://qiita.com/TakamiChie/items/a7f8921bdb95871d90e1

▼Service Worker の紹介
https://developers.google.com/web/fundamentals/primers/service-workers/?hl=ja

▼Service Workerに関する仕様とか機能とか
https://1000ch.net/posts/2014/service-worker-internals.html

▼Service Worker の紹介
https://developers.google.com/web/fundamentals/primers/service-workers/?hl=ja

SSL化したら警告なくなったし、使えるってことかな?
まぁ、jQueryのプラグインなんで僕にはどうにもできないし、キャッシュ系のAPIらしいので大したことにならないだろうからこのまま使っていようと思う