News for hackers. Stuff that matters.
Re:Building a new Windows 3.1 app in 2019: A Slack Client by shakna on Thursday December 19, 2019 @03:44AM (#21833127)
> It should work, more likely with JS off.

Many of the 3.1-era browsers didn't have a concept of JS yet. If you're relying on noscript at all it won't work.

I did try and check if this was the case, but both links in your profile that it could have been lead to "not found" dreamhost sites.

Re:Building a new Windows 3.1 app in 2019: A Slack Client by forgotmypw38 on Sunday December 22, 2019 @11:07PM (#21861424)
I feel obligated to comment, so that others are not led astray by parent comment, which is INCORRECT:

<noscript> works just fine in pre-JS browsers, at least all of the ones I've tried.

It works exactly as designed: Text between <noscript> and </noscript> is displayed in browsers without JS enabled (or supported).

I am not aware of any browsers where this is not the case, and I've tested in many, including Mosaic 1.x-3.x, NN 1.x-4.x, Opera up to 3.62, and others.

(You probably happened to visit my site during an upgrade. Sorry about that.)

Re:Building a new Windows 3.1 app in 2019: A Slack Client by Tepix on Thursday December 19, 2019 @04:10AM (#21833240)
Why would notscript not work on a browser that has no concept of JS?
Re:Building a new Windows 3.1 app in 2019: A Slack Client by shakna on Thursday December 19, 2019 @04:33AM (#21833346)
Because the <noscript> element isn't valid for the stricter form of HTML that they use. Invalid elements didn't used to show up.
Re:Building a new Windows 3.1 app in 2019: A Slack Client by cesarb on Thursday December 19, 2019 @05:57AM (#21833769)
From what I recall of that era, it's the exact opposite: invalid elements (like <noscript>) are simply ignored, and their contents shown. That's how <noscript> works: newer browsers which understand JavaScript know the <noscript> element and ignore its contents; older browsers which do not understand JavaScript don't know the <noscript> element so its contents are shown. The same trick is used for <noframes>: browsers like Netscape which understand frames don't show the contents of that element, while other browsers which don't understand <frame> and <frameset> will show the content of the <noframes> element, so it can be used as a fallback.

Strict validation of HTML came later with XHTML, but AFAIK all browsers which understand XHTML also understand JavaScript.

Re:Building a new Windows 3.1 app in 2019: A Slack Client by shakna on Thursday December 19, 2019 @09:08AM (#21834976)
XHTML came after HTML 4.0, so it had its advent around the rise of JavaScript's popularity.

However, HTML 2.0, which you can find specified here [0], and it specifies the "ignore" behaviour. Short of spinning up an old VM, I think I'll trust that my memory hasn't failed me.

From RFC 1866:

> markup in the form of a start-tag or end-tag, whose generic identifier is not declared is mapped to nothing during tokenization. Undeclared attributes are treated similarly...

> For example: > <div class=chapter><h1>foo</h1><p>...</div> > => <H1>,"foo",</H1>,<P>,"..."

[0] https://www.w3.org/MarkUp/html-spec/

Re:Building a new Windows 3.1 app in 2019: A Slack Client by bawolff on Thursday December 19, 2019 @09:36AM (#21835214)
If that was true, why did <script> tags have that horrible hack where the contents started with <!-- to hide from old browsers?
Re:Building a new Windows 3.1 app in 2019: A Slack Client by shakna on Thursday December 19, 2019 @09:41AM (#21835260)
Note that in the example code I gave the enclosing tag vanished, but the internal tags did not. That's why.