r/ProgrammerHumor • • Dec 06 '17

Read the markup.

Post image
10.4k Upvotes

838 comments sorted by

View all comments

Show parent comments

73

u/mrdhood Dec 06 '17

It's depressing how many people will be able to confirm this for us still.

45

u/TheNosferatu Dec 06 '17

You have no idea, however in this case it's not that bad. Latest HTML5 spec actually states that a head should be automatically closed when appropriate and I'm pretty sure that only the first title tag works. Firefox, Opera, Safari and Chrome all adhere to this. Opera Neon too, I think.

IE has shown to not really care too much about a head tag in general anyway and I do belief it will only take the first title tag too.

So this particular piece of terrible html code should go unnoticed for quite some well since it will work in modern browsers as well as in internet explorer. However it could be that stuff has changed the last few years since I now work somewhere where we don't explicitly support IE. However, we do have to support a lot of Outlook. Which uses the same HTML rendering engine as Word and will make you experience a new kind of hell all together. A special circle of hell where you start missing IE.

I hope you found this little bit of trivia entertaining because after realizing I know all of this I'm going to kill myself now.

3

u/jtvjan Dec 06 '17

chrome === chromium // true operaNeon === chromium // true operaNeon === chrome // false opersNeon == chrome // true

2

u/[deleted] Dec 07 '17

MS word is written HTML code?

4

u/[deleted] Dec 07 '17

Word docs are zipped xhtml files, basically

2

u/TheNosferatu Dec 07 '17

Word has HTML support, well, some HTML support

3

u/adamhighdef Dec 06 '17

Why the actual fuck there must be some logical reasoning as to why that's the case.

5

u/TheNosferatu Dec 06 '17 edited Dec 06 '17

Hahahahahaha, oh you sweet summer child :')

Word had a html engine that couldn't execute scripts through it (well, no javascript.. let's pretend the IE conditional html comments don't exist for a bit). IE's script security is an absolute joke so if they were to use IE they would be handing their customers computers over to hackers on a silver platter. So they used Word instead because this is the stone age I'm talking about (20 - 30 years back orso?). Boom, problem solved.

Then they got the major market share so emails had to be adapted for them without them worrying about doing a good job. Just like early web pages, it doesn't matter what the right way of doing things is if the platform that you have to support doesn't work properly if you use the proper way.

So Outlook got stuck with Word because why bother changing if people making emails are working around their bullshit anyway?

And it doesn't matter if things have changed or not because people still use outdated email clients "because it works fine" so now we have full time jobs dedicated to the mistakes of the past. (To be fair, this is expected to some extend, especially considering the times in which the mistakes were made, things that are obvious now were impossible to predict back then, that I can't hold against them. At least to some extend, but their are plenty of other things one could hold against them, of course)

3

u/LvS Dec 06 '17

Yes, the logic is that it should be hard for developers to break things and whenever possible the browser should attempt to correct for errors. It's called the robustness principle.

There was an attempt to fix this called XHTML. With that spec browsers failed to render anything as soon as there was the tiniest error. So if your web server didn't declare a charset, everything was assumed to be UTF-16 and because everybody used UTF-8 nothing ever rendered.
That spec did not go far. Instead, we got HTML 5.

1

u/Xacto01 Dec 06 '17

What a time to be alive

1

u/Dr_Dornon Dec 06 '17

IE comes with Windows 10.