+ Start a Discussion
sudhakar reddy 13sudhakar reddy 13 

List few best practices for improving visual force performance

Ajay K DubediAjay K Dubedi
Hi Sudhakar,
There are the following best practices for improving visualforce:-
1.Do not hardcode picklists in Visualforce pages; include them in the controller instead.
2.Javascript and CSS should be included as Static Resources allowing the browser to cache them.
3.Reference CSS at the top and JavaScript a the bottom of Visualforce pages as this provides for faster page loads.
4.Mark controller variables as "transient" if they are not needed between server calls. This will make your page load faster as it reduces the size of the View State.
5.Use <apex:repeat> to iterate over large collections.
6.Use the cache attribute with the <apex:page> component to take advantage CDN caching when appropriate