Actual situation:
Ajax using the NetAdvantage AsyncRefreshPanel control has a considerable number of viewstates when returning (I think Microsoft's UpdatePanel will also have the same problem );
Sometimes the returned ViewState exceeds 30 kb. If the network speed is slow, the user experience is very high.
1. Some people say:
Don't use viewstate compression! Use http compression instead!
Http://bloggingabout.net/blogs/ramon/archive/2006/09/01/Don_2700_t-use-viewstate-compression_2100_-Use-http-compression-instead_2100_.aspx
2. The actual situation is that HTTP compression is enabled, but does Http play a role in Postback? I don't think it works.
3. Generally, ViewState compression is implemented by setting hidden fields:
ViewState Compression
Http://www.codeproject.com/KB/viewstate/ViewStateCompression.aspx
Improved Method for compressing ViewState in ASP. NET
Http://www.cnblogs.com/mack/archive/2005/07/28/202235.html
4. The hidden domain set by myself will not be found when AsyncRefreshPanel updates ViewState (the same problem may occur for Microsoft UpdatePanel );
So it is best to use the original ViewState. But this friend said he may encounter FormatException:
FormatException occasionally occurs when Convert. FromBase64String is used to compress ViewState.
Http://topic.csdn.net/u/20081216/18/3d4426f8-6070-4544-a03b-5a9f7b5e2d27.html
5. The actual code 4 was tested. No FormatException occurred for the time being. It works normally in AsyncRefreshPanel.
However, the specific performance improvement was not carefully tested.
6. Take a look:
* You can configure whether to compress data;
* The minimum compression value can be configured;
* Do not change the hidden domain. Use the original hidden domain.
7. Change the day to have time to send detailed test results.