One reason to disable preload for browser-update 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

1 Like

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

4 Likes

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 Likes

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

3 Likes

For rest browsers, it’s not worth wasting users’ bandwidth for unused preloaded resources.

There’s no such thing as IE 18.

It has been ok for the past ~six years.

Six months more isn’t a big deal. The reason to spin out IE support is more to reduce complexity than any burden created from preloading.

3 Likes

What about Microsoft Edge?

I hope, in next 6 months it will be removed.