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
anna425912anna425912 

Need Visualforce in page layout to load asynchronously

I would like my visualforce pages on the page layout to not slow down the loading of the entire page.  Is there some way I can make the entire VF page just load asynchronously.  It seems to work if I create another VF that puts these VF pages into an iFrame, but that seems like a silly workaround since it is basically creating 2 visualforce pages for every 1. 
harsha__charsha__c
Hi Anna,

There is a way for this and we usually call it lazy loading...

Take out all the logic that you have in the constructor and put it into another method. Call that method from the javascript on page load with the help of an apex:actionfunction.

This helps to load the page first and then process your stuff.

Hope this helps...

- Harsha