What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

At least in Firefox, Meta is showing StackOverflow's offline page.

EDIT: I don't mean that Meta's page is showing the wrong image.
I mean that when Meta is down, it redirects to SO's down page.

DEMO

Meta's dedicated page is not shown:

Meta Means Murder

share|improve this question
    
Works fine here in FF4. –  marcog Jan 27 '11 at 15:35
    
@marcog: I don't mean in sstatic.net/stackoverflowmeta/app_offline.htm. I mean when meta is actually down. –  SLaks Jan 27 '11 at 15:39
    
Oh, I see. So it's redirecting to the wrong page. –  marcog Jan 27 '11 at 15:41
    
Exactly​​​​​​​​​​. –  SLaks Jan 27 '11 at 15:43
add comment

3 Answers

up vote 1 down vote accepted

The offline page gets no love since it's hardly ever shown. I have added a few tweaks.

share|improve this answer
    
You didn't do a very good job. –  SLaks Feb 27 '11 at 23:46
add comment

The code also has three other issues:

Since the strings in hotHash are strings and not regex literals, the \ escape in meta\.stackoverflow is swallowed by the string literal.
They should be regex literals.

http://sstatic.net/nothingtoinstall/app_offline.htm 404's.
However, that codepath is never taken anyway.

There is nothing to match askubuntu.com.

share|improve this answer
add comment

This is due to some poorly-written Javascript code in the global SE offline page which tries to redirect to the offline page for the appropriate site:

<script type="text/javascript">
    var hostHash = new Object();
    var hostName = window.location.hostname;
    var sstaticOffline = 'http://sstatic.net/';
    var returnUrl = window.location;        

    hostHash[sstaticOffline + 'stackoverflowmeta/app_offline.htm'] = 'meta\.stackoverflow';
    hostHash[sstaticOffline + 'stackoverflow/app_offline.htm'] = 'stackoverflow|localhost';
    hostHash[sstaticOffline + 'serverfault/app_offline.htm'] = 'serverfault';
    hostHash[sstaticOffline + 'superuser/app_offline.htm'] = 'superuser';
    hostHash[sstaticOffline + 'nothingtoinstall/app_offline.htm'] = 'nothingtoinstall';
    hostHash[sstaticOffline + 'skins/sketchy/app_offline.htm'] = 'stackexchange';
    hostHash[sstaticOffline + 'stackapps/app_offline.htm'] = 'stackapps';

    for (var entry in hostHash) {            
        var regEx = new RegExp(hostHash[entry]);

        if (regEx.test(hostName)) {                
            window.location = entry + '?return=' + escape(returnUrl);
        }
    }

    $().ready(function () {
        $('#return').attr('href', returnUrl);            
    });

</script>

The problem is that setting window.location doesn't immediately stop the script.
Therefore, after matching meta\.stackoverflow, it will go on to match stackoverflow|localhost and redirect to SO's offline page.

share|improve this answer
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .