inbtwn

here comes the no notes ghost 👻

  • he/they

hi there. i'm inbtwn. nice to meet ya!

i sometimes post about Things, mostly niche internet things like youtube videos, webcomics, etc. but i also reblog (rebug) a LOT of cool things so uhhh be warned



kiophen
@kiophen

This is what I decided to do today I guess. Here's how much HTML your browser renders to make a single post on different websites. This is a long post and has a rant at the end (Don't Miss Out!)

Color codes

Red - Header

- Username, timestamp, or anything else that's on the top section of a post.

Pink - Avatar

- The profile picture

Green - Body

- Anything that makes up the middle of the post that isn't the main post text. (#Tags, and HTML needed to structure the body)

Sky blue - Body text

- The actual post content.

Dark blue - Footer

- Any text or buttons at the bottom of a post, like the share/like buttons.

The first image for each site is the HTML as viewed in my browser's dev tools (inspect element). The second is an example post, where every element in the post has a translucent dark blue for a background color. When an element is "stacked" more, it will appear darker.

Cohost:

image image

Since Cohost allows writing custom HTML, this could be much longer depending on the post. I only want to show what the website generates for a standard text post, though.

Tumblr:

image image

Way more than a Cohost post for a similar post. Some of the extra elements come from the mouseover events that Tumblr has on all the buttons and avatar. They aren't the actual popups, they're just the elements that handle the mouse event and become the container for the popup.

Neocities:

image image

Did you know neocities has a feed? When you sign up you can follow other people's websites so you can know when they update. It has a feature where you can post status updates like this. It's a bit bare bones, you can't reply to a comment on a status, only to the status itself. It's fine though since the main point of neocities is to be a web host, not a social media feed.

Twitter:

image image

The avatar section alone is larger than the entire neocities post. Is this all necessary? No

Mastodon:

image image

Nice. You probably can't read it from the image, but almost every element has a descriptive class name. It says (version 4) because the Mastodon software had an update recently, and my instance just switched to it. Apparently it's a pretty bad update for viewers that don't support javascript, as it doesn't have any fallbacks and will just display nothing at all.

Here's what they all look like in relation to eachother (from left to right: neocities, cohost, mastodon, tumblr, twitter):

Why is twitter a big guy

There are almost no professional web designers that write HTML by hand anymore. They use tools that have layers of abstraction that makes it easier to work with at large scales.

The HTML it outputs to your browser is not meant to be developed/looked at by anyone at that point. It's like a compiled program. It's optimized to a small size by giving everything classnames with corresponding CSS in the most efficient way possible, and becomes an unreadable mess in the process.

Here's a comparison to show what I mean. The HTML of a twitter post vs a mastodon post.

For the mastodon post I say ah yes splendid. this is the .status__content__text element because it is the element that contains the text content of a status. It is inside the .status__content element which is inside the .status element. Very cool! Computers

This is the text of the tweet because it's in this obfuscated tunnel of fuck in the .css-16my406 in the .css-1dbjc4n in the .css-1dbjc4n in the .css-1dbjc4n in the .css-1dbjc4n. i just wish i could have a Hang out with a Tibetan Monk Soda

This is the text of the tweet because it's in this obfuscated tunnel of fuck in the .css-16my406 in the .css-1dbjc4n in the .css-1dbjc4n in the .css-1dbjc4n in the .css-1dbjc4n. i just wish i could have a Hang out with a Tibetan Monk Soda

Who Cares If The HTML Is Ugly Just Close Your Eyes

True, most people don't see it, but anyone who's tried to make a userscript for twitter knows tfw. It's a pain in the ass to work with this, whatever selector you use to address a specific element that doesn't have an id WILL break your script after a site update. It also makes custom userstyles a fucking nightmare.

I think it also contributes to the general trend of 'black-box-ification' of technology where no one knows how anything we interact with on a daily basis works, or how to fix stuff when it breaks.

Like how they stopped putting schematics on the back of home appliances because there's a financial incentive to prevent people from knowing how to repair their possessions. (Or they have unserviceable microcontrollers inside)


invis
@invis
This page's posts are visible only to users who are logged in.

You must log in to comment.

in reply to @kiophen's post:

Twitter's class names look like something that css-in-js vomits up. I don't enjoy working with that, most of the time. But especially when some visual issue needs debugging, i just cross my fingers and hope someone else would do it D:

I don't recall compiled app's obfuscation as an upside of this mentioned in any project this was in. Most of the time, it's developers wanting to use stuff like that, especially in microfrontends (which i find overrated, but what do i know).

Oh yeah I don't think the obfuscation is an intentional upside, it's definitely just a side effect of the css optimization. Twitter doesn't have any financial incentive to make it harder to make userstyles for it, so it's not a one-to-one comparison to right-to-repair issues. It just annoys me in the same way lol.

Yeah. I wrote userstyles to remove the right sidebar on fb and make the main container wider. Twice.

On their recent restyle, i just gave up. That's too much hassle, especially when they have different class names for the same containers in different views (timeline, profile, groups).

I haven't looked at facebook in a while but it has to be a fucking mess, I remember when they made it harder for adblockers to pick up sponsored posts by making random letters in the word "sponsored" its own element

It's even worse now. I probably have some assets hard-cached in my browser from previous release, or some outdated ublock rules (with weird selectors because of the reasons you mentioned), so whenever i click on images and it turns into gallery view, the whole page breaks in the weirdest way.

And i can't be arsed to check what's wrong and if i can fix it, because i barely use fb except for checking on some events.

thanks for the suggestion, i went and checked it out:

a tweet as depicted in a nitter instance. the background color for every element is translucent blue to visualize how deep in the DOM they are

the HTML of a tweet as presented by nitter. color codes are in the original post

this html is soooo clean they don't waste any space. everything has very nice easy to read classnames also.

tweet on twitter vs nitter:

LOL....

I also checked to see how much data each one has to load. Loading my page on twitter downloads about 12 MB. (mostly javascript. the largest file is the 2.5MB main.js file.. its about 40,000 lines)

Loading my page on a Nitter instance, it downloads around 500KB total, half of that is profile pics and media thumbnails in my tweets.

(posted this with the wrong account at first)

as someone whose web coding is like 15 year old memories of Dreamweaver and Notepad, but occasionally tries to find direct links/images through web explorer stuff, this was fascinating