There wouldn’t be a web today if those of us who learned it with View Source had seen this utter shit-show.
(This is the markup for part of my Twitter feed. Web devs at Twitter, please, take a fucking bow.)
@aral Seems pretty much to work as designed here, in order to prevent people from screen-scraping Twitter, working around its API limitations...? 😉
If you focus a tweet (via keyboard and such), it adds IDs to some of these elements. Useful for scraping!
Also the class names don't change often anyway. And their noscript UI has clear class names too. It's certainly more of a way to minify the code, as it doesn't do much against scraping
@aral we need a "web mountains" bot.
@aral no wonder Twitter is dodgy slow these days. Plus, the unwieldy amounts of JS
@aral I think this is intentional sourcce code obfuscation, yeah webshite though
It's like "Yar's Revenge", but rendered by a really shoddy plumber.
@aral just delete twitter
@xj9 I will when I feel that it’s using me more than I’m using it :)
no I mean delete twitter the company and all of their servers
@xj9 Oh, yeah, sure, I wouldn’t object to that ;)
@aral looks like the styled components (CSS in Js) crap you get with current create-react-app. Web-dev went into a deep deep shithole thanks to popular frameworks of big-tech.
I remember face err voldebook err the-social-advertising-surveillancw-network-who-shall-not-be-named used this technique among many others to prevent crawling/scraping feeds.
sadly, with some success. at least i haven't seen any reliable self-hostable fb2rss or similar around generators in the last few years.
Kinda reminds me of the first (and only) Website I worked on directly, in 1999, using the StarOffice editor, before I decided to bite the bullet and just write it by hand so I could know what it was doing and tweak it until it also worked in Opera and Netscape, sometimes even Internet Explorer :)
@aral With the tools of year 2000, a web app like Twitter would be unthinkable. Nobody is supposed to maintain this code as HTML. It's generated.
@poujolrost Yeah, right? :)
I will probably never understand why they do this. Simply to obfuscate everything, ad scripts included?
@adidal I just… uhh… no idea… can’t… :)
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!