Slashdot HTML 4.01 and CSS
After 8 years of my nasty, crufty, hodge podged together HTML, last night we finally switched over to clean HTML 4.01 with a full complement of CSS. While there are a handful of bugs and some lesser used functionality isn't quite done yet, the transition has gone very smoothly. You can use our sourceforge project page to submit bugs and we'd really appreciate the feedback. Thanks to Tim Vroom for putting the HTML in place, Wes Moran for writing the HTML in the first place, and Pudge for writing the code to convert
900k users, 60k stories, and 13 million comments to comply. And for the brave, download the stylesheet and start experimenting with new themes and designs for Slashdot: some sort of official contest to re-design Slashdot is coming soon, so you can get a head start now.
Response to some reader notes in the forum:
- There are a handful of validation errors. Some will be fixed in the next day or so. Others are external HTML that is out of our hands. We may never toally validate with zero errors. yes we're comfortable with that.
- We're not going to XHTML for the same reasons as above- we control almost all of our HTML, but some of it (like the ads, and imports from other sites) just isn't ours to muck about with. We could go to XHTML, and someday we might, but today we're happy to just get to HTML 4.01 and CSS.
- Light Mode will be back in some form or another. The problem is that light mode served two purposes: Low Bandwidth, and Simplified Design. The later will probably be handled with a CSS theme (we have a handheld theme already). Low Bandwidth is a little trickier, but we will resolve that soon.
- All of our code is beta tested on www.slashcode.com and use.perl.org. Unfortunately there's always a few issues from those tiny tiny sites and the giant bohemoth that is Slashdot itself.
I was wondering if there was going to be a story on this. I noticed the upgrade last night. Let me be the first (post? ha ha) to say, "Good job guys!" Yeah. it took you awhile. But better late than never, eh?
:-)
/team!
And for the brave, download the stylesheet and start experimenting with new themes and designs for Slashdot:
I was just going to ask if we could get a few more CSS styles like we saw in the Beta. Glad to see you're already on top of it.
I did some testing with a FireFox version I *know* contains the infamous "Slashdot bug". (Not sure if it's corrected in recent versions since I normally use Mozilla or Safari.) As far as I can tell from testing, the bug is completely fixed. Considering the upgrades, one would expect this to be the case, but you can never be too sure.
Last but not least, the "Politics" and "Apple" sections look as nice as ever, but I'm afraid that the other sections look worse than ever. Can we turn off the colors for the other sites until better CSS sheets can be made? (Preferrably ones that don't hurt our eyes?) Yeah, the games section has the full treatment too, but I swear that the shades of purple it uses are causing me to go blind.
An alternative solution to turning off the CSS for the other sections is to provide the front page CSS as a style option on all the pages. That way we could simply shut off the crazy colors without pulling the whole "games.slashdot.org/article.pl -> slashdot.org/article.pl" trick.
Well, that's my 3.14159265 cents worth. Again, good job
Javascript + Nintendo DSi = DSiCade
I for one, welcome our new Standards Compliant Overlords.
How does the Slashdot Effect happen given that no slashdotters ever RTFA?
Although the Slashdot guys have blocked it again, there was a short time this morning where the validator could get through. It showed the main page as validating Ok for the most part, but some of the sidebars (especially the Freshmeat sidebar) as failing miserably. Just looking at the source doesn't give me a headache anymore though, which is a massive improvement.
I read the internet for the articles.
Validator says it's not correct Strict. There are 13 errors. Some areas still have FONT tags and whatnot, but I don't know if those are includes from external sites (and therefore out of
Welcome to the 21st Century.
At first glance, it doesn't look any different to me, so you must have done something right.
Except then I hit reply and the post a comment dialog looks a bit different but not bad.
Must have been quite the effort, congrats.
As a rock-in-roll Physicist once said, No matter where you go, there you are.
Why don't you guys have a formal testing process in place for slashcode?
They do. Beta code gets tested here before it's put on Slashdot. Now the upgrade process often generates quite a few 503s (since Slashdot is actually down during that time), but it's just a temporary problem.
If you're still getting 500s and 503s, try deleting all your cookies that point to "slashdot.org". Sometimes the upgrades have problems with old cookies.
Javascript + Nintendo DSi = DSiCade
Can we get some stats APIs? Like per-story counts of unique repliers (+/- ACs), broken down by point score, with metadata (date/time posted, categories, submitter ID, "author" ID). And links in the story, and comments (per point score)? How about some karma details?
I'd like to see a Slashdotter make an app that shows trends of posting results. And an app that draws networks between posters, destinations, categories, etc. Let's rub Slashdot's soft green underbelly!
--
make install -not war
Because.
There are 11 types of people in the world: those who can count in binary, and those who can't.
Better rending in Firefox and less dishonesty! What's not to like?
Don't blame me; I'm never given mod points.
I let someone else explain this one, but basically you should be using html 4.01 and not xhtml unless you really know what you are doing and have good reason to do so.
http://hixie.ch/advocacy/xhtml
"In a time of universal deceit - telling the truth is a revolutionary act." - George Orwell
http://images.slashdot.org/base.css
http://images.slashdot.org/comments.css
http://images.slashdot.org/ostgnavbar.css
http://images.slashdot.org/slashdot.css
http://images.slashdot.org/print.css
http://images.slashdot.org/handheld.css
my sig's at the bottom of the page.
Because XHTML is harder to write, and browsers can render HTML fine anyway, so what's the point? Yes, XHTML makes a cleaner spec if you're starting from nothing, but HTML is a standard that browsers have to be able to render, so XHTML doesn't make things any easier for anyone.
I am trolling
I would be very interested to know wheter this change has a big effect on the slashdot bandwith usage.
'Times New Roman' is so 27BC. It'd only take one line of css to get something with class. Like 'Comic Sans MS'. Everyone loves 'Comic Sans MS'.
NS 4 nearly has no support for CSS. That's why the "new slashdot" (heh, never thought I would see that phrase) looks crap in it.
Seriously, don't you think it's time to drop support for NS 4? I mean this is the slashdot crowd, that has been saying for the last 8 years that developers should comply with standards and don't tune web pages for a specific browser, and now that finaly it is compliant with the standard, you are complaining that it looks bad in an ancient browser? You know, slashdot now also looks completely crap on BeOS's netpositive. should I complain about that as well?
--
This topic was done to death last time.
Short summary: there are a few compatibility downsides and there's no real point because there's no benefit to using XHTML yet.
Bogtha Bogtha Bogtha
...get the following fixed? When you browse with a threshold that doesn't show all comments, the page numbers to click are completely broken. Sometimes, when I click on the 3rd or 4th page, I _still_ see the first post according to my threshold.
There is actually no way to view all comments in order. I usually resort to clicking a page way later, like the 6th or 7th until I see a comment other than the first. But then I don't know if I missed any.
The pages seem to count all comments regardless of score. The proper way is to count the posts _after_ the threshold is applied.
This has been bugging me _for ages_!
Of course it runs NetBSD. BTC: 1NT7QvbetmANwaMzhpVL6
"Just looking at the source doesn't give me a headache anymore though, which is a massive improvement."
/.!
Yeah, all I see now is blonde, brunette, redhead.
Wait a minute, that's not
I didn't notice nothing differnt about slashdot this morning. It still looks the same. They haven't done anything like DHTML or menus at the top with drop down effect. They're also still using Perl instead of PHP. The shuold be moving to PHP since that's what all other sites are doing now. THey also havn't changed their icons in like forever. And the green Slashdot logo needs to go. There's also no background graphic to give the site a more polished magazine like feel. If they knew anything about design, they'd be following the lead of sites like Wired.com and Playboy.com. After all Slashdot is really just an online magazine at this point. You guys should also consider a print version of Slashdot. I think if you combine the look of Wired, Playboy and MacOS X you'd have a winning UI. You should also force user's browsers to open a new window devoid of any browser menus/widgets/buttons. That way you could then create a true UI for Slashdot and make it like a magazine application. A navigation bar at the top with Aqua-esque buttons would be grand. There should also be application sounds. Clicking on buttons should play different sounds. Like if you click on the link for apple.slashdot.org, you should hear the Mac startup sound. Or if you click on yro.slashdot.org, you should hear a gavel pounding on a desk. Or if you click on bsd.slashdot.org, you should hear a death rattle. There should also be a live Slashdot cam that shows us what you guys are up to at any time of the day. Kind of like Jennicam used to be, only like heavily censored so we don't see private stuff. Maybe the cameras could have moderation so that the highest modded images go on the front page in the upper left corner. Another thing. There is this program/standard file format called Flash. It can really spice up a site and make it feel more like an application. You could also embed some Java apps too, but Flash is the way of the future for all web sites. It's the tool most creatives prefer. So can anywone tell me what is actually different about Slashdot today than it has been since like the 1980s when it was called Usenet?
I also recommend that people start sharing their own user-defined stylesheets (like they've done with Gmail), so this site no longer looks like crap.
Like a CSS Zen Slashdot.
Joe
http://www.joegrossberg.com
You're in Light Mode. Slashboxes don't appear in Light Mode for obvious reasons (and I believe that's a change from before). Go to Preferences: Homepage and uncheck Light, then save. That should do the trick.
... slashdot does not work with Netscape 4 when I try it today.
It sucks in Mosaic 1.0 as well.
Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
We obviously did not forget about it, as another commenter suggested. Tim and Wes put in quite some effort to make sure it was still supported in some form. But much of its reason for existence will (soon) be able to be accomplished by simply changing style sheets. You the user can do that with various hacks; on our side, as Rob mentioned in his writeup for this story, we hope to provide some mechanism for users to pick different style sheets sometime soon.
Light mode was a kind of a half-assed hack that tried to do "show me Slashdot a little cleaner," "reduce my bandwidth for my 56K modem," and "give me the bare necessities for my mobile device," and IMHO didn't do any of those very elegantly. And the implementation kinda sucked too, so we want to get rid of it for code cleanup reasons. We're going to do mobile support properly (eventually) and let style sheets do the cleaning up. The third justification was bandwidth, and webpage bandwidth is pretty irrelevant in 2005.
For now (at least), Light mode means no slashboxes, which makes sense to me (at least). If you want slashboxes, the workaround is to turn Light mode off. If you're in the ~1% of Slashdot readers who simply must have the Light-mode look and slashboxes too, I'm afraid you'll have to bear with us until we get the changes I described above implemented.
And now I just realized Rob said much the same thing in his updated "response to reader notes," so go read that :)
Ever since the November 2003 article on A List Apart, I've been wondering if this day would come. Almost two years later, it looks like it's finally here!
Having worked on smaller sites, I can imagine how difficult this change was. I took a quick peek at the code; it's so much cleaner now, and it loads so much faster! Congratulations, guys.
Have you read the Moderation Guidelines Addendum?
Hahahahahaha :)
This is a lot like the argument for why bothering to comment, or why bothering to make code easy to understand, or why bother to code a web page in a half-arsed way as long as IE renders it OK.
.ch site). Good HTML will look almost exactly like XHTML, why not make that extra step?
/. should be easy.
Because its the Right Thing To Do.
Sure, it works fine as is. That's great. But if you can code in XHTML, why not? There are no good reasons not to apart from the fact you are lazy (I don't buy any of the arguments from that
XHTML enforces nice, clean code. None of the HTML fanboys can argue that. It can be parsed nicely in an XML parser, making it portable into all sorts of applications, from automagic web spiders making massive search engines, to little Java programs. HTML makes parsing more complicated, and the error handling an even bigger pain. Getting everyone to XHTML, especially technology flagwavers like
No, you don't have to do XHTML. But you should.
The plan right now is to have a few large chunks of the site drop in and out for a less bandwidth intensive version. Essentially we strip the site down to what must be here: Less menu items, less boxes on the right. Basically, "Title" "Advertisement" "Stories" "Some Menus And Links". VERY minimal. Get the page down to as few bytes as possible. This We'll probably have a stylesheet too, but mainly this page will just have far fewer bytes of stuff.
Design-wise we can create themes for modern handhelds. A generic theme is already available but it's a real quickee job. But now we can create thinned down look and feel customized for any individual handheld. Of course we don't really have any of these fancy devices ourselves, so hopefully readers will help by designing CSS that does just that.
Pants are still optional, but recommended for you.
This was done awhile ago, and almost no one noticed.
Basically, we were allowing various things in comments for years that were not compliant with HTML 4.01 strict. Even moreso for stories. So about six months ago we fixed the code to force compliance with HTML 4.01 strict, and about two months ago converted old content accordingly.
edit my ass.
Sorry. There's no substitute for diet and exercise.
We already forced HTML 4.01 strict compliance on comments six months ago. Almost no one noticed.
We already converted 13M comments to valid HTML 4.01 strict. A couple of months ago. No one noticed.
It would be relatively trivial to force XHTML 1.0 strict compliance. I'd flip a switch to force compliance on new content, then rerun the converter for old content. The code's been tested to work for both HTML 4.01 strict and XHTML 1.0 strict (since we allow only a relatively small subset of HTML tags and attributes, this isn't that hard for comments, or even stories, which allows a lot more variety in tags, but everything still fits in the intersection of the two, so it's just a matter of changing a very few number of things, that the code already knows about).
I've read this rant a few times now, and of all of his reasons, none are very compelling.
.toUpperCase() or .toLowerCase() when checking tag names, and you have to be able to detect whether to use namesapace aware functions or not based on which mime type you are using. Also, for sites (like slashdot) that don't use much javascript, this is probably not really an issue.
/>" have very different semantics when parsed as HTML4. So if there was to be a fully compliant HTML4 UA, it would be quite correct to show ">" characters all over the page.
* <script> and <style> elements in XHTML sent as text/html have to be escaped using ridiculously complicated strings.
Or you could refer to external files which you should probably be doing anyways. Besides, it's 2005. Are there still browsers in use that don't recognize the script tag? I haven't run across one in at least five years. Even browseres that don't support JavaScript at least know to ignore the contents of this tag.
* A CSS stylesheet written for an HTML4 document is interpreted slightly differently in an XHTML context (e.g. the element is not magical in XHTML, tag names must be written in lowercase in XHTML). Thus documents change rendering when parsed as XHTML.
Well, the second case is easily solved by writing tag names in lower case anyway. Wow, that was tough. I can't remember ever seeing a non-contrived case where the first was an issue, and even then it could be trivially worked around.
* A DOM-based script written for an HTML4 document has subtly different semantics in an XHTML context...
This is probably his one valid point. I do agree with this one, but also feel that it could be worked around with a little thought if you had a valid reason to use XHTML. Mainly you just need to use
* Scripts that use document.write() will not work in XHTML contexts.
Good! document.write() should have been put out to die years ago.
* Current UAs are, for text/html content, HTML4 user agents (at best) and certainly not XHTML user agents. Therefore if you send them XHTML you are sending them content in a language which is not native to them, and instead relying on their error handling. Since this is not defined in any specification, it may vary from one user agent to the other.
And this is different from sending your document as HTML 4 how?
* XHTML documents that use the "/>" notation, as in "<link
Probably technically true, but I've never seen this "SHORTTAG minimisation" discussed anywhere else, and I can't recall ever having dealt with a UA that treats self closing tags in such a manner.
In short, there are issues to watch out for, but there are a lot of cases when XHTML may be preferable to HTML 4 (e.g. using an XML based content management system), and as the most popular web browser on the internet doesn't handle XHTML when served as application/xhtml+xml (and it has been announced that the next version will not either) and all remotely modern UA's will handle XHTML served as text/html, there are a lot of cases where it doesn't put make sense to put off adoption of XHTML for 2 years or more until the majority of browsers can handle it properly.
That said, HTML 4 is still a perfectly valid alternative, and for a site like Slashdot where there are no compelling reasons to go with XHTML, and a lot of valid reasons for not, I don't see why anybody should complain that the site was done as HTML4+CSS and not XHTML+CSS.
If I don't put anything here, will anyone recognize me anymore?
It's turning into a morph of Godwin's Law.
Because it's my law, I will call it MFH's Law:
The dangers of knowledge trigger emotional distress in human beings.
Err, except the way it is now is semantically correct - it's a list of links. Your way it's just a bunch of links all mooshed togethor with no semantics at all.
There is a lot of "div-itis" though, but I'm guessing that was to provide flexability for user defined stylesheets in the future, so can be forgiven i guess.
NZ Electronics Enthusiasts: Check out my Trade Me Listings
+4 Funny for "Hahahahahaha :)"?!!! Hell, I can beat that. Check it:
:D
"BWWWWWWWWWAAAAAAAHAHAHAHAHAHAHA!!"
oh and