Heykuki News

TopNewBestAskShowJobs
TopNewBestAskShowJobs
Tell HN: The CSS that Makes Medium.com Load Really Slowly
9 points
logn
13 years ago
HN is always filled with great Medium.com links. But for whatever reason, in Firefox 21.0 on my Mac OS 10.7.5 (MacBook Air), every page on their site takes several seconds to load. It always felt like a bug and no other browser on my computer has this slowness. So I did a little digging and some binary-search-like process of elimination to find the culprit.

The problem is in this CSS resource:

http://dnqgz544uhbo8.cloudfront.net/_/fp/css/main-base.f4gmHr37dkTU585y-PwfDg.css

Specifically this line:

  .wf-loading .post-header .post-title,.wf-loading .post-field.subtitle,.wf-loading .post-field.body,.wf-loading .post-meta,.wf-loading .post-author-card,.wf-loading .post-article .caption{visibility:hidden}
And specifically this part of that line:

  .wf-loading .post-field.body,
I verified this by downloading their only two CSS resources locally and along with an HTML page from their site. I edited the HTML to point to my local CSS from their CDN and could reproduce the slowness every time (loading from my local SSD!). When I remove ".wf-loading .post-field.body," from the above-mentioned CSS, the page loads instantly.

I figure I could dig some more to see how that CSS class is being used any why it's being used. But I figure this is a good task for someone at Medium.com ... of course this may be a Mozilla bug. And the real defect may be in something that's slow prior to changing visibility from hidden. Anyhow, if a developer at either organization could fix this, I'd greatly appreciate it. Maybe some others experience this same bug.

11 comments