Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
4chan switches to HTML5/CSS3 (SFW) (4chan.org)
94 points by ginko on April 28, 2012 | hide | past | favorite | 48 comments


This is the first time I've ever seen (SFW) and 4chan in the same sentence. And probably, one of the only places where I'd believe it.


Just glancing at the front page, the SFW boards on 4chan outnumber the NSFW (18+) boards. Of the top 4 boards in terms of 4chan's traffic, only two are in the 18+ category.

/b/ (the very NSFW board responsible for 4chan's notorious infamy) accounts for 30% of 4ch's traffic but the next two most popular boards /v/ (video games) and /a/ (anime and manga) are both SFW. Not that I would recommend anyone to lurk 4chan at work.

The traffic and popularity figures I mention are on Wikipedia with citations: http://en.wikipedia.org/wiki/4chan


In practice, the "SFW" standards on 4chan are quite lax. Case in point: /g/ (the technology board) and /v/ (the video games board).

I'd think twice before browsing either of those boards at work.


I don't doubt that, but I never see links to the SFW boards. I almost exclusively read or get sent links to /b/.


Why would anyone ever send someone a link to /b/? Threads last half an hour, tops. By the time the person sees the link, the thread has likely 404'd.


IM, not email.


Edit: Apologies, my bad. Misread.


I think you misread, nobody was suggesting to lurk 4chan at work, in fact the exact opposite.


One of the things that this does improve vastly is rendering in Chrome for Android/ICS (and I assume, other mobile browsers). The old markup didn't scale very well and made for a lot of horizontal scrolling.


Surely HN must now be next?

The cobbler's children have gone unshod so long!


Every time a community I'm part of goes and redesigns their site it sucks hard. Really hard. Please Paul, do not listen to the designgeneers on here. This place is just fine the way it is!


>This place is just fine the way it is!

Can we at least compromise on unicode vote arrows?


Case in point: Slashdot.


Dear God, HN has neither a doctype nor a tableless layout... D:


Yet somehow it just works. Why waste your time on idiomatic CSS when good old tables work just fine?


Accessibility, bandwidth savings, maintainability, semantic markup, visual consistency, support for more complex layouts, and removing the need for ugly hacks—remember spacer gifs?


Except... the site works fine like it is. And it's not a mass consumer site. It's mostly for techies/geeks. And it's not PG's core business. YC is.

Believe me, I have at least a few upgrades I wish were made here (fixing that "the link does not exist" bug, and making commenting/editing more friendly like Reddit), but they are not a big deal, we'll survive.


Hey. Don’t ruin my broad oversimplifications by adding reasonable context.


sorry :)


Because tables are a pain in the ass and CSS is not


Haha I remember when it was the other way around...


Tables have always been a pain in the arse.


This isn't HTML5, this is HTML4 div and span soup with an HTML5 doctype. If they really wanted clean markup, they'd use the proper elements everywhere.


The "proper elements" seem to change every two or three of years. For people getting real work done, especially if there's a lot of legacy markup involved, it can be very challenging to stay up-to-date with what the talking heads have decided is the "proper" way of doing things.

Just look at the <b> tag. 10 years ago, we used it frequently. Five years ago, we were told NEVER to use it, and to use CSS instead. These days we're told it's okay to use again, because now under HTML5 it has new semantic meaning. Five years from now, by the time people have used it throughout their markup again, the attitude will change and it'll once more be verboten.


So? There is a new version of the spec, go read it, learn how it's supposed to work, then decide which parts you want to implement. Point is, there is not a single HTML5 tag in 4chan's markup as far as I could see. They're completely missing the point.

It's only the OCD CSS designers who treat every superfluous div and span as a stain upon their work. The rest of us happily use the new meaningful HTML5 structure where appropriate, and keep sprinkling on divs/spans to help guide the layout and style.

And FYI, the <b> tag wasn't supposed to be replaced by CSS, it was supposed to be replaced by <strong> in cases where you wanted to highlight a span in text. Because the act of highlighting text shouldn't be coupled to what it looks like. Unfortunately, most people can't think in semantic terms and still write web content like it's MS Word. That's why HTML is such a complex beast: because we humans constantly give ourselves too much credit, and ultimately, the web is an enormous hack job achieved through minimum effort.


My question is WHY do they need to switch to HTML5? Does the complicated layout and rich metadata of 4chan require something more advanced than HTML4?


Visit https://boards.4chan.org/htmlnew/ and narrow the browser window (or better yet, visit from your phone). It's somewhat responsive - posts wrap correctly and once the page is narrow enough "view thread" buttons appear for easier browsing and less scrolling.

The old 4chan layout didn't even wrap correctly on mobile devices (requiring tons of horizontal scrolling) - IMO, this alone is worth the rewrite.


Relevant quotes:

* "The new HTML should be much easier to parse, and when benchmarking the official 4chan Chrome extension, we found that it parses approximately 600% faster."

* "CORS [Cross-origin resource sharing] is now supported"

* "responsive design for mobile browsers"


According to the post, they got rid of a lot of spans and tables. Sure, they probably could've done that while staying within HTML4/XHTML, but when you're changing things around already, why not stick to the most recent standard?


They're using JavaScript onmouseover to show spoilers which can be accomplished in straight CSS2. I assume that's for IE compatibility. They're also still using <br/> tags in post comments, but I assume that's because it's easier to write a nl2br converter than to intelligently parse comments with more than two newlines into semantically-correct paragraphs.

I would have thought 4chan's thread format perfect to use the new <article>, <header>, and <footer> tags.


Considering that we're talking about 4chan, this might count as heavy abuse of the "article" tag…


Seems like it was just a rewrite for the sake of cleaning up code rather than to be HTML5 and it's not like the old site was valid HTML4 or that the HTML5 can't be parsed by most HTML4 parsers. I don't know why you wouldn't use a HTML5 doctype.


Even if you don't use any new browser-features, HTML5 is better than HTML4 because of niceties like simpler doctype, not having to write type="text/javascript" on all script tags and so on.


The change mostly benefits 4chan extension/userscript developers (like 4chanX) and board archivers, which have to parse the DOM (the only public 4chan API) back into data. If you look at the current markup (the new markup isn't live yet), it's a total mess of tables and font tags.

Also as mentioned, it has a responsive layout for mobile screens.

I'm pretty sure the new markup is designed by moot (the 4chan admin/creator) himself, so it's fairly clunky for 2012 (wrapper divs and spans everywhere, inline javascript and styles), but again, it's still a vast improvement.


It's buggy. For instance, I can see an anchor inside a span, but the span is closed before the anchor is closed. Also, and admittedly nitpicking a little here (don't hate me 4Chan! I come in peace...) but they are still using CDATA in their script tags. If you are using HTML5, I don't think you still need to support legacy browsers :-)


HTML5 is supposed to degrade gracefully. Nothing about it should instantly break old browsers, so there's nothing really inconsistent about using CDATA with HTML5.


Like I say: I'm nitpicking. To be honest, I'm not a fan of inline javascript. But I'm not really 4chan's core audience - they may have a reason why they have so much inline js.


Why would any part of 4chan's audience care about such implementation details (e.g. inline javascript)?


Why would they care about HTML5?


Interestingly, I think the real story here is how popular this mostly content-free post is. makes me wonder how many HNers are closet /b/tards (I count myself in that group).


HTML5 but the same old UI? What benefits it brings?


> What benefits it brings?

Much better behavior on smaller width (e.g. mobile phones), smaller, simpler markup (so faster downloading, parsing & rendering), and likely increased simplicity for extension developers.


Read the post and you'll see. Faster parsing, new features etc.


Also, if they changed the old UI, the denizens of 4chan would kill them.


SFW, you say. I think I will play it safe by not clicking.


Well done I guess... heh

slow clap


I was expecting more Pedobear


Since when did 4chan innovate?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: