4 ms·
John Resig's CSS optimization for F7U12 SubReddit (more than 6x improvement)
- Klonoar 16y agoAh, nice, so a notable open source author of a massively successful frontend library fixes a bug that's obvious to any frontend developer worth their salt. It's nice, but news? Really?
- wmeredith 16y agoOut of all the pretentious "this isn't Hacker News" comments, this is the most ridiculous example I've seen. If this isn't Hacker News, what is?
- singlow 16y agoBut this isn't an optimization that I can learn from, really. I mean, unless I made that same mistake in referencing my sprite images, which seems unlikely. Basically, look at firebug and see what all the connections are coming from and fix it.
- justsee 16y agoThat isn't the test for whether something is Hacker News-worthy though? However a notable developer hit a problem on a well-known site, diagnosed, proposed and explained a solution, and did it in a friendly, humorous way. So there are a few lessons there on how hackers can conduct themselves in a positive manner in online communities.
- singlow 16y agoMaybe I would have appreciated the article better if the title hadn't said "CSS optimization". That made me expect to find some secret to help me make CSS load or render faster. He really fixed a bug in the use of a CSS sprite file. More interesting: someone finds a way to find other instances of sprite files being used incorrectly on a given domain. But I think Google PageSpeed would identify this for accessing a static file with query string.
- Klonoar 16y agoIf I wanted to read about basic CSS spriting techniques/benefits, I'd go read one of the endless reposts on A List Apart, Smashing Magazine or SitePoint (or one of the hundreds of other sites). I'd throw down solid cash on a bet that the people who come to HN come here because the type of content you'll find here is generally far above that level, and there is absolutely nothing wrong with demanding quality submissions. We all know John is a great guy and a kickass developer, this doesn't need to be re-stated for the umpteenth time. If you'd like, though, I can happily start submitting every article on basic web design techniques I come across though. Seems like it's right up your alley, no? =)
- RP_Joe 16y agoI found it very helpful.
- mquander 16y agoHonestly? On the front page: Magical Block Store: Why EBS Can't Work -- http://news.ycombinator.com/item?id=2479613 http://news.ycombinator.com/item?id=2479613 Russia's Crime of the Century -- http://news.ycombinator.com/item?id=2479865 http://news.ycombinator.com/item?id=2479865 How many zeros are there in 2^n? -- http://news.ycombinator.com/item?id=2479129 http://news.ycombinator.com/item?id=2479129 The difference is that those posts link to content which shows you something interesting. As a consequence, two of them have interesting comments, too (the political one can be excused.) It's hard for me to understand what is interesting about John Resig fixing a relatively boring CSS performance bug, but I guess that's why we all have our own vote button.
- power78 16y agoI completely agree here. Hacker News has become a reddit cesspool over the last year and the types of posts popular on reddit seem to make it over here. I will leave this community in a year because I am sure the two communities will begin to mimic each other too much. If it wasn't John Resig who "fixed" the subreddit, then this would be lost in the thousands of pointless posts. I hardly find this something worth of HN.
- beseku 16y agoI think its nice in that its a great example of someone having so much passion for what they do that even something as trivial as this fix is to them worth the time to remedy.
- whimsy 16y agoThe point is that it's really cool that some developer took the time to clean up part of the internet that is largely orthogonal to his life. That's respectable, right? If he put this in a blog post instead of a Reddit comment, would you still be complaining?
- Klonoar 16y agoYeah, because it's not about the fact that it was done on Reddit, it's the fact that this just isn't news to most people here. This is easily one of the most basic web design techniques pushed today, and what he fixed is so espoused in the basics of frontend performance that I'm shocked people consider this news. John's a great dev and a nice guy who just fixed a subreddit. I don't see it as news if he makes an incredibly basic change to an arbitrary site, though - I follow him on Twitter for this kind of information. ;)
- DisposaBoy 16y agoTo be fair most of the things I see on the HN front-page are either not news to me or not interesting to me. So going by your logic my question is: Why are so many uninteresting non-news-worthy links on the front-page? As to your other point about there being other sites out there where you'd go t read about CSS... that same argument can be made for every single link posted here, so my question is: Why are we here?
- alecco 16y agoNote it's an improvement for a particular sub-reddit. Edit: nice, someone fixed the title.
- ZackOfAllTrades 16y agoAfter reading it, it only improves a certain subreddit by 6x. It doesn't actually change much for the overall site besides the fu subreddit.
- StavrosK 16y agoOther subreddits aren't so image-heavy, and thus already load fast.
- Joakal 16y agoIncorrect headline, Reddit already utilises CSS sprites: http://www.reddit.com/static/sprite.png?v=0ec7f79c9f54824fdef1fe36aef6ad27 http://www.reddit.com/static/sprite.png?v=0ec7f79c9f54824fde... Headline should be: "John Resig's CSS optimization for Reddit's subreddit of fffffffuuuuuuuuuuuu (more than 6x improvement)"
- seabee 16y agoCSS sprites wasn't the issue anyway. It was an interaction between the way the CSS referenced images and reddit's overzealous optimisations for its CDN turning every reference into a unique one.
- mtogo 16y agoPlease fix your title. EDIT: Thanks.
- DanielRibeiro 16y agoFixed. I am usually against long titles, but if the community prefer a more specific, albeit longer, title, so be it.
- mtogo 16y agoIt's not a matter of specificity, it's a matter of inaccuracy.
- DanielRibeiro 16y agoOk. I really appreciate the feedback. Hope it is better now.
- midnightsun 16y agoYeah, this is a nice improvement. You can see it in detail with a tool like Slowcop (the identical resources loading): http://slowcop.com/reports/4db4dd3e728daf5e96000007/reddit-com-r-fffffffuuuuuuuuuuuu http://slowcop.com/reports/4db4dd3e728daf5e96000007/reddit-c...
- zitterbewegung 16y agoDo other subreddits use custom icons that would benefit with a similar optimization not just f7u12? I think there are a few.
- spydez 16y agoYep. Quite a few use those same rage faces. Reddit really ought to just implement that themselves and let subreddit mods turn it on or off, since they're getting so popular.
- StavrosK 16y agoHah, very nice! I'll make sure this gets implemented. I'm sort of kicking myself for not doing it myself, but I just never noticed that images were loaded again on each request...
- troels 16y agoRunning Yslow or pagespeed on the site would have turned up the same thing. Not to diminish John's effort, but it's really not black magic.
- deleted 16y ago[deleted]