ASP.NET Postback Optimization

Web Stimulus Page State

Web Stimulus takes web page statefulness to a new level. It automatically allows restoring not only the state of controls, but also the state of any other page member during postbacks. Using this page state management solution does not require coding. Implementing page state management in Web Stimulus creates no detrimental impact on application scalability and performance.

The figure below shows how Web Stimulus handles server and client page state between HTTP requests using its ability to marshal data packets in both directions. After executing the server part of the page a subset of its object state is automatically marshaled in a form of binary-serialized data packets to the client within a HTTP response message. Data packets include the page state relevant to the client. The developer indicates what server objects to marshal to the client. Since the ViewState is generated on the client it is not included in the HTTP response. This reduces the download traffic.

On the client the instance of the client page is created and page objects are restored from the data packets or Web Stimulus cache. Then the client page completes execution and renders dynamic HTML which is instantly loaded in the browser without causing any network traffic. Next the browser displays the web page. After the end-user initiates a postback, the browser prepares to send an HTTP request with a postback form that includes ViewState along with other request parameters. The Web Stimulus client adds to the server request an upload packet with page members. Upon receiving the HTTP request the ASP.NET framework on the server recreates the page object and restores controls. Web Stimulus automatically restores other page member's attributes. As a result the ASP.NET page becomes fully stateful.

Web Stimulus page state. Click for larger image.

Web Stimulus's page state management solution has the following benefits:

  1. Continually maintains the state not only of controls, but also the state of other page members.
  2. Maintains the page state with minimal coding. Server-to-client and client-to-server synchronization works automatically. A developer just marks selected page members using Web Stimulus controls or add-ins for Visual Studio.
  3. Allows independent customization of the download and upload state. The developer has flexibility to separately select which page members to include in the HTTP request and the HTTP response. This minimizes traffic by synchronizing only the necessary subset of the page state according to the page logic.
  4. Substantially reduces the page state on a server by maintaining some or all of the stateful page members only on the client. Chapter II of the Programming Guide explains how to split the page state without coding.
  5. Faster browsing. Web Stimulus reduces web page DOM because page state is not loaded into the browser. It is stored within the Web Stimulus client framework.
  6. Using data packets for synchronization allows the use of network bandwidth more efficiently, since, unlike ViewState, the data packets generate truly binary traffic that is free from base-64 encoding overhead.
  7. Offloads the server session by storing page information in the client session with no detrimental impact on application scalability.
  8. Substantially reduces network traffic due to excluding the markups and ViewState from the download, since they are generated on the client.

Technology Highlights

All-Tiers Acceleration Tool. Web Stimulus is used to effectively resolve the performance bottlenecks of any ASP.NET application on all tiers. more...

Fewer Limitations. Web Stimulus removes many web application limitations and solved many web performance problems. more...

Page Lifecycle. Web Stimulus adds another dimension to the ASP.NET page lifecycle. It facilitates the page's second ASP.NET lifecycle on the client. more...

Page State. Web Stimulus raises web page statefulness to a new level. It automatically allows restoring not only the state of controls, but also the state of any other page member. more...

Cached Page Lifecycle. Web Stimulus maximizes page efficiency by assembling it on the client using valid cached page elements and elements downloaded from the server. more...

Optimizing ViewState. Web Stimulus completely removes ViewState from the download traffic and reduces its payload 3-5 times in the upload traffic. more...