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

Calling Window.onload using actionFunction in Custom VF page



I have a Custom VF page in a pagelayout. The VF page takes some time as it has a callouts, so the pagelayout takes time to load. I am trying to make the VF Page Asynchronous on window.onload. To do this, I am thinking of using apex:actionFunction which calls window.onload.


Can someone please help me with some samples or starting point to go over this ? 

Maros SitkoMaros Sitko
rendering of embeded VF page is always asynchronous - it is simple iframe html element

Thank you Marcos.


I know hightlights panel in page layouts is asynchronous as it is a separate IFrame. And I think VF pages comes in a separate Iframe.


Is there any way to make the page layout load more quickly. Right now we have like 4-5 Custom VF pages in the layout and it some time to load.

Maros SitkoMaros Sitko
I do not know about solution how can be pages loaded faster.
But try to add showHeader="false" sidebar="false" to apex:page tag into your VF pages, or add all your VF pages into one.
second option: create wrapper page for each VF page, include it instead of current page. In these page will be again iframe but without src. then put javascript into wrapper page, which fill iframe src and call it onload. pagelayout will loaded quicker, but for embedded pages you will still wait. it is unusual solution, but probably can help