Live data from Hacker News

HTML hacks that shaped the Internet

tedium.co

191–200 of 233 posts

Re: HTML hacks that shaped the Internet

#191
post #39
post #15

It's funny how we came around to JSSS, and it's now everywhere: from CSS-in-JS to web components coding their CSS in strings inside Javascript

I've looked up some JSSS code examples, and it seems like it's pretty much the only type of code where the "with" keyword makes sense: tags.H1.color = "red"; tags.p.fontSize = "20pt"; with (tags.H3) { color = "green"; } with (tags.H2) { color = "red"; fontSize = "16pt"; marginTop = "4cm"; }

It was also a rarely-used classic way to deal with variable references that changed in a loop:

  var values = [];
  for (var i = 0; i 
This would log 3, 3 times. The usual fix (before the variety of modern ways) was to use an IIFE in the first loop:

  for (var i = 0; i 
Alternatively, this works:

  for (var i = 0; i 

Re: HTML hacks that shaped the Internet

#195
post #179

Earlier quoted context omitted.

IIRC non-table based layouts are rendered progressively, while table-based layouts have to be loaded fully first, and only then rendered. At the point when this was relevant, the Web was slow (slow connections, slow rendering engines), so one of the primary motivations for ditching tables for layouts was an increase in the perceived page rendering speed, not just a purist quirk.

I don't think that's accurate. It was old Internet Explorer that wouldn't render tables progressively. See here, where it includes a demo: https://www.vbulletin.org/forum/showthread.php?t=161099 Non-table layouts also came into fashion when screen resolutions started to vary more, and some degree of fluidity and responsiveness could've been implemented with non-table layouts while IE was still a target. However, IE w…

> I don't think that's accurate. It was old Internet Explorer that wouldn't render tables progressively.

IIRC Netscape didn't either around the IE4/5 days. It also had significant performance problems with large sets of nested tables which IE6 (and perhaps IE5) did not.

For example back at University on 133MHz Pentium-class CPUs a large slashdot page with all threads open could take minutes to render where IE took merely a noticeable number of seconds - a co-student use to make a big thing of this as a reason to dump other browsers and use IE. There was actually a use case for this away from the University's fixed line connection: on dial up you could, RAM+swap and browser-not-crashing permitting, open a couple of windows like that then disconnect the modem and read at your leisure without racking up a per-minute phone bill.

Or maybe NS was capable of progressive display and this was just hidden in extreme cases by the performance issue, that was a time ago and memory is hazy…

Re: HTML hacks that shaped the Internet

#196

Earlier quoted context omitted.

I was going to comment that I took offense to calling table-based layout a hack in the first place. When tables went out of favor, and I saw many, many front end dev teams waste cumulative months of time creating a much less understandable web page fiddling with float nonsense all over the place, solely so "purists" could keep their religion in tact, I learned a valuable lesson. Joel Spolsky calls them "Architecture…

IIRC non-table based layouts are rendered progressively, while table-based layouts have to be loaded fully first, and only then rendered. At the point when this was relevant, the Web was slow (slow connections, slow rendering engines), so one of the primary motivations for ditching tables for layouts was an increase in the perceived page rendering speed, not just a purist quirk.

If you added attributes for the number of rows and columns (something like ), it could render it progressively.

I don't recall if that was vanilla HTML or vendor extension, I suspect not vanilla.

I stopped doing front end work about the time tables for layout went out of fashion, my dorky internal tools still use them.

Re: HTML hacks that shaped the Internet

#200

This gave me ptsd haha. Also shows how mush cost we have/had with one company (MSFT) fucking up so bad. Imagine the hours incurred because IE sucks?

Nowadays it's Microsoft Teams, one step forward and two step backwards, every. single. update.
Post reply on HN