function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mario Gustavo Pereira ReisMario Gustavo Pereira Reis 

Visualforce page limit 135kb

Hello,

Can i change limit of visualforce page?

Thank you
shiva pendemshiva pendem
HI Mario,

Here are the links to avoit the view state limit in vf page.

Please find below:

https://developer.salesforce.com/page/An_Introduction_to_Visualforce_View_State
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_transient.htm

Thanks,
Shiva
Amit VaidyaAmit Vaidya
The main things are as follows:

1) Don't use apex:form tag inside apex:form tag
2) User trasient keywords for variable which is needed only for the duration of a page request
3) Declare some variable as static if possible, create static code block to recreate them in each request
4) Check your SOQL queries, if you are querying additional fields, never used or required on visualforce page. Please select only required fields.
5) Using static variable or static block aslo helps to reduce viewstate size as it doesn't get transmitted through the view state

Thanks,
Amit