When the view state size is exceeded, the page content is usually replaced with a message that says Maximum view state size limit (170KB) exceeded. Actual view state size for this page was [size]KB
. However, this causes unusual behavior when it occurs on a public page on a force.com site. Users are not presented with this message, and are instead redirected to the Authorization Required Page for the site. In situations where the page is intended to be usable by the public without login or authentication, this redirect is immensely confusing.
How can I avoid the site guest user from encountering this redirect when the view state is exceeded?
To be clear, I am not asking how to fix the view state size limit error, but rather how to gracefully handle such an error if one occurs in this specific situation.