Activity Forums Salesforce® Discussions How to Improve page load speed of Salesforce Visualforce pages?

  • Archit

    Member
    March 28, 2018 at 3:02 pm

    Hello Amresh,

    For improving the speed of loading the visualforce page we can have to make that page lighter and for making the lighter pages we use javascript, angularJS, jquery etc.

    Thanks!

  • Archit

    Member
    March 28, 2018 at 3:21 pm

    Hello Amresh,

    we can also focus upon the below points to improve the loading of page.

    • Check the current speed of your website.
    • Optimize your image size.
    • Use Content Delivery Network.
    • Avoid self hosted videos.
    • Use CSS sprites.
    • Switch off the plugins you won't use.
    • Minify HTML, CSS and JavaScript.

    Thanks!

  • Neha

    Member
    March 29, 2018 at 5:48 am

    Large page sizes directly affect load times. To improve Visualforce page load times:

    • Cache any data that is frequently accessed, such as icon graphics.
    • Avoid SOQL queries in your Apex controller getter methods.
    • Reduce the number of records displayed on a page by:
    • Limiting the data coming back from SOQL calls in your Apex controllers. For example, using AND statements in your WHERE clause, or removing null results
    • Taking advantage of pagination with a list controller to present fewer records per page
    • “Lazy load” Apex objects to reduce request times.
    • Consider moving any JavaScript outside of the <apex:includeScript> tag and placing it into a <script> tag right before your closing <apex:page> tag. The <apex:includeScript> tag places JavaScript right before the closing <head> element; thus, Visualforce attempts to load the JavaScript before any other content on the page. However, you should only move JavaScript to the bottom of the page if you’re certain it doesn’t have any adverse effects to your page. For example, JavaScript code snippets requiring document.write or event handlers should remain in the <head> element.

    Hope this helps you..!

  • Parul

    Member
    September 20, 2018 at 6:53 pm

    Hi,

    Long page sizes directly affect load times. To improve Visualforce page load times:

    1. Cache any data that is frequently accessed, such as icon graphics.
    2. Avoid SOQL queries in your Apex controller getter methods.
    3. Reduce the number of records displayed on a page by:Limiting the data coming back from SOQL calls in your Apex controllers. For example, using AND statements in your WHERE clause, or removing null results
    4. Taking advantage of pagination with a list controller to present fewer records per page
      “Lazy load” Apex objects to reduce request times.
    5. Consider moving any JavaScript outside of the <apex:includeScript> tag and placing it in a <script> tag right before your closing <apex:page> tag. The <apex:includeScript> tag places JavaScript right before the closing <head> element; thus, Visualforce attempts to load the JavaScript before any other content on the page. However, only move JavaScript to the bottom of the page when you are sure it does not adversely affect your page. For example, JavaScript code snippets requiring document.write or event handlers do belong in the <head> element.
    6. In all cases, Visualforce pages must be under 15 MB.

Log In to reply.

Popular Salesforce Blogs