News for hackers. Stuff that matters.
Re:10 Weird HTML Hacks That Shaped the Internet by hn_throwaway_99 on Friday December 01, 2023 @11:21AM (#38488472)
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 Astronauts" in a great blog post - the types of developers who forget that their job is to actually produce working software that does something well with the least amount of effort (architecture astronauts also gave us the ridiculousness of the first EJB spec, and stuff like the widely derided AbstractFactoryBuilderConstructor nonsense from Java). I feel like I've done a good job over time recognizing these architecture astronaut personalities and staying far away.
Re:10 Weird HTML Hacks That Shaped the Internet by jenscow on Friday December 01, 2023 @11:35AM (#38488686)
For sure. While tables went out of fashion, there was nothing usable to replace them.

I was not really interested if those doing a "View Source" are going to be offended by my "incorrect" use of tables.

Re:10 Weird HTML Hacks That Shaped the Internet by Izkata on Friday December 01, 2023 @05:57PM (#38493740)
Check out a "View Source" on HN ;)
Re:10 Weird HTML Hacks That Shaped the Internet by ghusbands on Friday December 01, 2023 @01:53PM (#38490657)
Not everyone who cares about accessibility is an architecture astronaut.
Re:10 Weird HTML Hacks That Shaped the Internet by handy2000 on Friday December 01, 2023 @03:03PM (#38491525)
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.
Re:10 Weird HTML Hacks That Shaped the Internet by slapo on Friday December 01, 2023 @04:23PM (#38492634)
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 was lacking so badly even with IE8 that a lot of CSS that had been a W3C recommendation for years at that point just either didn't work, it was quirky because IE handled the box model a little differently. Ít was one of the reasons why Javascript shims and IE-specific CSS had to help out fairly often.

Re:10 Weird HTML Hacks That Shaped the Internet by dspillett on Friday December 01, 2023 @06:32PM (#38494059)
> 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:10 Weird HTML Hacks That Shaped the Internet by slapo on Monday December 04, 2023 @06:42PM (#38524883)
I haven't worked with Netscape that old, only some time after it became free of charge, but I remember it was really slow at just about anything compared to IE 5.5 and 6 - startup, rendering, UI. To the point that even if it could render tables progressively, it wouldn't really matter on my computer (which I think was either an Intel Penium II or an AMD Duron 850), despite only having a dial-up connection.

I think it was around the time of Firefox 1.6 when it felt like it was about on par with IE 6 in rendering speed for me, after tweaking some of its settings. I think it was also rendering tables progressively at the time.

Re:10 Weird HTML Hacks That Shaped the Internet by handy2000 on Friday December 01, 2023 @04:30PM (#38492719)
> I don't think that's accurate. It was old Internet Explorer that wouldn't render tables progressively.

You both agree and disagree with my comment :)

If memory serves me right, I started migrating off table layouts at the time when IE6 was still by far the most popular browser (>80% of the market?).

Re:10 Weird HTML Hacks That Shaped the Internet by wayfinder on Friday December 01, 2023 @07:14PM (#38494415)
IE had a setting that forced tables to render progressively. They documented it on the Microsoft web dev site and also I’m reasonably sure in their “cool things you can do in IE5.5” book.
Re:10 Weird HTML Hacks That Shaped the Internet by handy2000 on Friday December 01, 2023 @07:51PM (#38494663)
Didn't know that! Wonder what made them choose to turn this off by default. Must be an interesting eng story.
Re:10 Weird HTML Hacks That Shaped the Internet by wayfinder on Saturday December 02, 2023 @12:57AM (#38496311)
I used it and it almost progressively updated too often - like cell by cell, so it wasn’t very pretty. So you kind of had to know when to use it and when not to.
Re:10 Weird HTML Hacks That Shaped the Internet by slapo on Monday December 04, 2023 @06:25PM (#38524679)
So did I, but at the time, screen resolutions were starting to vary more.

It was probably a case of killing several birds with one stone - make layouts fluid while avoiding IE's issues with rendering tables.

Re:10 Weird HTML Hacks That Shaped the Internet by _jal on Friday December 01, 2023 @06:41PM (#38494145)
If you added attributes for the number of rows and columns (something like <table ... rows="4" cols="4">), 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:10 Weird HTML Hacks That Shaped the Internet by handy2000 on Friday December 01, 2023 @07:56PM (#38494692)
Not in the HTML 4.01 spec (https://www.w3.org/TR/html401/struct/tables.html), so probably a vendor extension (don't think I ever used these attributes).
Re:10 Weird HTML Hacks That Shaped the Internet by fsckboy on Friday December 01, 2023 @03:05PM (#38491557)
what do you mean by "purists" wrt tables? not nesting them or something? or using them only for marking up "relational" data and not page layout? or were these purists from the design side?
Re:10 Weird HTML Hacks That Shaped the Internet by wayfinder on Saturday December 02, 2023 @01:07AM (#38496362)
Tables semantically are meant to represent tabular data and using them for layout became “wrong.”

From a practical point of view too, if you wanted to make separate mobile and desktop views just by using different stylesheets, using a table made it very difficult.

(That said, in 2000, if you were using separate mobile and screen stylesheets, you were in an extreme minority because there were relatively few full HTML web browsers on mobile devices. Instead, most phones, if they could access the Internet, accessed a different version of the Internet accessed over WAP.)

Re:10 Weird HTML Hacks That Shaped the Internet by dreamcompiler on Friday December 01, 2023 @07:48PM (#38494645)
Every time I need tabular layout I try the tool du jour: Floats, CSS grid, etc.

It never works like I want it to, and I never know if it's because I'm dumb or the tool is poorly-designed, and by then I've wasted two hours, so I always end up just going back to tables because they freaking work.

Re:10 Weird HTML Hacks That Shaped the Internet by bazoom42 on Saturday December 02, 2023 @01:06PM (#38500520)
Tables just works - as long as you know when and how to use the 1x1 transparent spacer gif.
Re:10 Weird HTML Hacks That Shaped the Internet by ifwinterco on Friday December 01, 2023 @08:07PM (#38494756)
Yep replacing tables with floats is just swapping one hack for another, with its own set of edge cases, browser incompatability etc.

The good news is now flexbox and grid work in all modern browsers, so this is (finally) a solved problem

Re:10 Weird HTML Hacks That Shaped the Internet by wayfinder on Saturday December 02, 2023 @01:01AM (#38496333)
Floats were ugly but once you did enough of them, you could nail it every time. It shouldn’t have taken months if you had an experienced team.

The only issue with floats was that there were a lot of edge cases that happened in only certain browsers, so you had to be careful. Lots of browser bugs.

Job security.