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.

As Pekka mentions in this Meta post, the chat advertisement information is cached for an extended period of time, resulting in it being a bit laggy. One consequence of this is that if the original server-side request used to generate that cache fails, the error response seems to stick around for an equally lengthy period of time.

This causes some trouble with the chat advertisements in the sidebar, since not only will they load with the "Could not access chat" message, they also will never update due to the following check in displayRooms():

if(data.error != undefined)
{
   rooms.text(data.error);
   return;
}

This prevents the later code which queues up the chat polling function from being called, meaning that the chat box will never recover from what was likely a short-lived API error until the server-side cache is cleared.

This same thing would happen if a request failed for updates from the client, but that's not a huge issue given that navigating to a new page/refreshing will correct it. In this case, the chat ads are broken for everyone, for the entire life of the cache, making it a little more noticeable.

Ideally, the failure wouldn't be cached, or the client side code would allow for the client to ask for updates in the event that the preloaded chat information was broken.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The Chat Ad will continue to poll even in the face of errors after the next deploy.

share|improve this answer
2  
The Little Chat Ad that Could, awesome. :) –  Tim Stone Jan 19 '11 at 23:58
    
Not to be a bother, but could you also change date.getDay() to date.getDate() in the return statement at the bottom of friendlyTime()? I hadn't noticed before, but it's showing the day of week index instead of the date, heh. –  Tim Stone Jan 20 '11 at 5:59
    
Also, ts is just the difference in seconds, so there's no TotalSeconds property, it should just be delta, which I guess is why I was getting that long date format in the first place. –  Tim Stone Jan 20 '11 at 6:06
    
the above are fixed –  Marc Gravell Jan 20 '11 at 14:20
add comment

You must log in to answer this question.

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