If you hit the back button and return to page which resulted from a from POST (you know, someone submits a form where method="post") then you are always going to get that warning dialog.
If, on the other hand, the page was not a form post but rather a page that actually expired, this makes me think that some kind of headers are already being sent in which case it would make sense to alter them.