title: Occasional 422 error: client not sending session cookie?
body: <p>A few users are getting a <code>422 ActionController::InvalidAuthenticityToken</code> error when POSTing a form.</p>
  
  <p>It happens to a minority of users some of the time. If they try their request again later, it often works.</p>
  
  <p>The authenticity token is getting sent along in every case. I'm assuming the client isn't sending the session cookie along with the POST (that would explain why the server can't verify the token). Why would this be?</p>
  
  <p>Finally, the form is submitted via javascript (<code>$('#new_user')[0].submit()</code>), would that somehow prevent the session cookie from being sent?</p>
  
  <p>Disabling the <code>verify_authenticity_token</code> before_filter is unfortunately not an option.</p>