禁用浏览器更新 JS 预加载的一个原因

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

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

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

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

对于其他浏览器,为未使用的预加载资源浪费用户带宽是不值得的。

根本不存在 IE 18。

过去大约六年一直运行良好。

再多六个月也无伤大雅。剥离 IE 支持的主要原因是为了降低复杂性,而非预加载带来的负担。

那 Microsoft Edge 呢?

我希望它能在接下来的 6 个月内被移除。