ブラウザ更新用 JS のプリロードを無効化する理由の1つ

Hi,

I noticed Discourse HTML code having below kind of lines

    <link rel='preload' href='/assets/browser-update-xyz24ff41586d6dcda055f0cfb41488724ba2e2d5271fef65ce5f480b46f9231d.js' as='script'/>
<script src='/assets/browser-update-xyz4ff41586d6dcda055f0cfb41488724ba2e2d5271fef65ce5f480b46f9231d.js'></script>
  • What it does?

  • Is it for other browser as well except outdated Internet Explorer?

Please see https://caniuse.com/#search=preload

If browser would be already outdated then

  • How is it going to support preload?

  • I don’t see advantage of preloading at least for modern browser who probably don’t need browser update message.

I am not sure if this is related to just Internet Explorer or other too, in case IE; may be we can just use conditional HTML comment line instead using JS? This would be lightweight.

<!--[if lt IE 9]>
	<div>Unfortunately, <a href="https://www.discourse.org/faq/#browser">your browser is too old to work on this site</a>. Please <a href="https://browsehappy.com">upgrade your browser</a></div>
<![endif]-->

Top 10 Web Browsers
1 Chrome 78 38.51%
2 Safari 13 8.65%
3 Chrome 77 5.89%
4 Safari 12 4.25%
5 Firefox 70 3.57%
6 IE 18 3.17%
7 IE 11 2.99%
8 Samsung 10 2.44%
9 Chrome 76 1.82%
10 Chrome 74 1.44%
Source: W3Counter: Global Web Stats

  • Is it still neccessary?

Thanks & Regards,
Gulshan

「いいね!」 1

AFAIK IE is still supported until June, although support is currently being moved into a plug-in.

「いいね!」 4

Most of my audience are familier about latest browser. I would be happy to ignore support for IE.

Move Internet Explorer support to core plugin

Discourse will be dropping support for Internet Explorer in June 2020. (A formal announcement will be made mid-January). In preparation for this, Internet Explorer specific code has been moved into a plugin, making it easier to remove come June.

Source

「いいね!」 7

Why would preloading be a problem? I do not understand your request.

「いいね!」 3

それ以外のブラウザでは、使われないプリロードリソースのためにユーザーの帯域幅を無駄にする価値はありません。

IE 18 など存在しません。

過去約 6 年間、問題なく運用できています。

さらに 6 ヶ月延長しても大きな問題ではありません。IE サポートを分離する主な理由は、プリロードによって生じる負担を減らすためというより、複雑さを軽減するためです。

「いいね!」 3

Microsoft Edge はどうでしょうか?

今後 6 ヶ月以内に削除されることを願っています。