ActionController::InvalidAuthenticityToken

hi, since i use protect_from_forgery in my code i got sometime some
“ActionController::InvalidAuthenticityToken” exception.
In rescue_action_in_public in application.rb, i handle this exception
with a redirect but it can be annoying for a user validating a form.

The point is i like to know what does raise this exception? and is
there a better way to handle them?