15

Stack Overflow seems to be having some CSS issues right now. At first, it presented as CSS disappearing when refreshing in Firefox (though hitting Enter from the address bar seemed to restore it - I'm thinking that's a cache issue though). I loaded my blank Firefox profile and discovered CSS wasn't rendering on Stack Overflow at all (Meta seems fine; haven't checked other SE sites).

I've since checked the site in Chrome and Opera, and can repro in both.

3

4 Answers 4

12

The CSS is loaded from the Stack Exchange static resources domain, using a third-party Content Delivery Network:

<link rel="stylesheet" type="text/css"
  href="https://cdn.sstatic.net/stackoverflow/all.css?v=62fd31659efc">

Are you sure cdn.sstatic.net is not somehow blocked (or otherwise non-reachable) in your browser/system/network?

  • A few times, this CDN has been misbehaving by asking for a CAPTCHA—which you would obviously not see as the CSS is loaded in the background. See CAPTCHAs are intermittently blocking CDN content and try to open the CSS in a new window to see if it loads.

  • Beware that the CSS is often, but not always, loaded using HTTPS. Some company networks might not like HTTPS at all, or ancient browsers might not trust its certificate. And as long as HTTPS is not officially supported on Stack Exchange yet: in cases where the main page is loaded using HTTPS but that page still tries to load the CSS using HTTP (such as chat, in March 2014), some browsers might refuse to load it. Such browser warning might be hard to spot though:

  • When troubleshooting the CDN, see some information the team likes to see in Intermittent Responses from CDN.

  • The ?v= is just a cache breaker, to ensure a new version is loaded if it has changed; it does not load a specific version.

  • Note that Meta does not use sstatic.net:

    <link rel="stylesheet" type="text/css" 
      href="/content/stackoverflowmeta/all.css?v=5ace4c636510">
    
  • All of the above also applies to the JavaScript libraries. (Including not using the CDN on Meta, for easier testing before rolling out changes network-wide, as all sites share the same JavaScript files.)

4
  • This may have simply been time sensitive, as everything is working properly for me now as well. To address your answer though, if sstatic.net were blocked, meta would have had the same issues, and I'm sure I would have noticed the issue before (home network, haven't changed anything lately). If it were caching, it wouldn't have been an issue in the other browsers. I'm guessing I just happened to see the site hiccup - perhaps a code push that went slightly awry?
    – anon
    Commented Mar 31, 2011 at 10:02
  • No, @Jesse, Meta is not using that server. (Maybe for easier testing?) Still, you might be right: maybe sstatic.net itself was not responding for a moment?
    – Arjan
    Commented Mar 31, 2011 at 10:21
  • I didn't realize Meta didn't use sstatic.net. All the other sites do. I guess Meta is special. With that in mind, you're probably right about sstatic.net not responding for a couple minutes.
    – anon
    Commented Mar 31, 2011 at 10:26
  • 2
    Yeah, meta serves static content itself, indeed for easier testing before rolling out changes network-wide (this wouldn't be so much of an issue for CSS, since that's site-specific, but all sites share the same JavaScript files).
    – balpha StaffMod
    Commented Mar 31, 2011 at 11:38
2

add to "hosts" like this

# fix stackoverflow cdn problem because of GFW 190.93.247.58 cdn.sstatic.net 190.93.246.58 cdn.sstatic.net

Because I'm in china,so github and stackoverflow always open failed. Hope that useful.

1

if you are using chrome, then you can check this repo: StackoverflowCDN, it is a chrome extension to abort long time downloading the css/js files of sstatic cdn, instead load local one.

1
  • But as commented elsewhere, this needs manually updating the resources whenever some JavaScript is updated. (And Stack Exchange updates quite often.)
    – Arjan
    Commented Mar 29, 2014 at 7:34
0

Just want to share my solution. I tried all the good solutions mentioned above. Unfortunately, nothing worked for me. The CSS was loading in chrome but in firefox.

As I removed adblocker extension, it started working.

1
  • The problem you're referring to was posted as a question (and closed) here. The solution there is much better, as it doesn't involve disabling the adblocker.
    – Laurel
    Commented Aug 24, 2018 at 6:54

You must log in to answer this question.