I know the different options (None, ReadWrite, Read) and what they mean, but are there any other implications? Does ReadWrite take a performance hit compared to None, for example? A开发者_JAVA技巧re there other consequences, or things to keep in mind?
I emailed Michael Schwarz, who wrote AjaxPro, and got the following reply:
Well, the main reason for adding this attribute was to get rid of blocking http requests. If you are accessing session state variables in two requests the 2nd one will need to wait until the first one is finished. Since I have added this attribute value I always use HttpSessionStateRequirement.None.
For more details see:
- http://msdn.microsoft.com/en-us/library/system.web.sessionstate.irequiressessionstate.aspx
- http://msdn.microsoft.com/en-us/library/system.web.sessionstate.ireadonlysessionstate%28VS.80%29.aspx
- Browser waits for ajax call to complete even after abort has been called (jQuery)
精彩评论