Yes, but the JavaScript for the live chat icon (imo) shouldn't be cached. It should always be exactly what the status is set to.
Another simple solution could be two script tags - one which just sets a variable:
Code:
var operatorStatus = 'online';
And the other which handles all of the front-end logic for displaying the status and simply references this variable.
Then to poll the status every X seconds/minutes as we currently do, simply reload that actual script tag.
Another simple solution would be to keep the JavaScript cached as it is, but make it include an external script which polls the status.
At the moment I don't really have the time to whip up any examples of what I mean here, but you guys should be able to catch on.