Compressed Viewstate

Stable Version 4.0.0 (Compatible with OutSystems 11)
Other versions available for 10 and Older
Published on 31 October 2018 by 
4.6
 (10 ratings)

Compressed Viewstate

Details
Monitoring the size of the viewstate is very important because the viewstate is sent to the server and client on every (ajax) request. This component calculates the size of the compressed viewstate of your page and displays the size of it. Just drag the widget to somewhere on your page, change the site property to true, and everytime you load your page you'll be able to quickly see on your screen the compressed viewstate size. In this new version the display of the size of the viewstate is automatically refreshed after every ajax request.
Read More

Be sure to go to service center and change site property "ShowCompressedViewstate" to true so that it's shown.

Monitoring the size of the viewstate is very important because the viewstate is sent to the server and client on every (ajax) request.

This component calculates the size of the compressed viewstate of your page and displays the size of it.

Just drag the widget to somewhere on your page, change the site property to true, and everytime you load your page you'll be able to quickly see on your screen the compressed viewstate size.

In this new version the display of the size of the viewstate is automatically refreshed after every ajax request.

If it is anywhere below 5kb, you should be fine, higher than that, you probably need to do some adjustments to your page based on outsystems best practices.

VERY BASICALLY, the viewstate of your page is whatever information the server needs to know about your page on every request, so, basically, whatever info that any action (except the preparation) needs from your page that you aren't sending on a request (either by inputs or by refreshing queries/actions)

In every request that you do to the server, you have to send the compressed viewstate with it, the server has to decompress it before treating the request and compress it again to send to the client on the end, so, the bigger it is, the longer any request will take.

What’s new (4.0.0)

Upgrade to OutSystems 11

Reviews (1)
2019-07-17
in version 4.0.0
Not working for me, neither on my screen nor on the sample screen provided.
Getting the following error,

Uncaught TypeError: Cannot set property 'innerHTML' of null
    at refreshViewStateSize (CompressedViewstate.js?16994:4)
    at GMFDashboardReports.jsf:116
    at HTMLDocument.<anonymous> (_osjs.js?10_0_604_0:32)
    at l (_osjs.js?10_0_604_0:18)
    at Object.fireWith [as resolveWith] (_osjs.js?10_0_604_0:18)
    at Function.ready (_osjs.js?10_0_604_0:18)
    at HTMLDocument.mb (_osjs.js?10_0_604_0:18)

Any further configuration required apart from the mentioned site property?
Related Components
More from Frederico Sousa