When using TempData, my understanding is that it will keep whatever you put in it around for only one request. So when using TempData to retain data across a redirect (in order to use the Post-Request-Get pattern), isn't it possible that some other request from the user could come into the server in between the response sending the redirect and the user's browser requesting the redirected-to page? In which case the get would no longer have the TempData available, correct?
Now, I understand that something like that happening would be very rare, but taking into consideration that the user might have another page open in another tab, and there might be either ajax or timed callback requests occuring on that page, it suddenly doesn't seem all that impossible to me. Is it just generally considered to be too remote to worry about, or am I misunderstanding something?
Edit: To be more specific about the scenario I was asking about.
- In Tab 1 the user browses to a page with a post form
- In Tab 2 the user browsers to another page on the site that does ajax callbacks on a timer
- In Tab 1, the user posts the form to the server
- When the server receives the post, it saves some data in TempData and sends back a redirect response
- In tab 2, the timed ajax callback happens, sending a GET request to the server. The TempData is removed from the session
- In tab 1, the browser receives the redirect and issues a GET request
- The server processes the GET request and looks for the TempData, but it's not there anymore