One reason to disable preload for browser-update JS

AI-generated summary

The discussion revolves around disabling preload for browser-update JavaScript in Discourse. Gulshan_Kumar questions the purpose of preloading, particularly for modern browsers that don’t need browser update messages. They suggest that preloading is unnecessary and wasteful for users’ bandwidth. Gulshan_Kumar also mentions that most of their audience uses the latest browsers, making support for Internet Explorer (IE) unnecessary.

Gulshan_Kumar would be happy to ignore support for IE, which is being phased out by Discourse in June 2020 Stephen. Stephen and Justin_Vega clarify that IE support is being moved to a plugin and will be removed eventually.

Gulshan_Kumar hopes that the preload will be removed in the next six months. Justin_Vega raises the point about Microsoft Edge, but it is not addressed further in the discussion.

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.

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.

What about Microsoft Edge?

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