1

I have a Visualforce page whose controller extension is calling a class to make a web service callout and displaying some data on the page. I'm in the process of optimizing the Apex and page away from governor limits, for best practice...practice.

My tech lead suggested that I render some of the results from the web service in an iframe, as that counts as a separate execution context and thus has an entirely new set of governor limits. I have very little web development experience, and my question is this - what are the consequences of rendering a portion of the content in an iframe? Is this discouraged for any reason? Is it reasonable to expect the content in the iframe to be rendered at about the same time the content outside of the frame, or could there potentially be a noticeable visual separation?

2
  • Will this page be enabled for SF1? If so, you'll want to avoid the use of iframes.
    – crmprogdev
    Mar 31 '15 at 15:00
  • Not as of now, but there is a very likely possibility we'll be asked down the road to make it SF1 friendly - why is that? Mar 31 '15 at 15:01
1

A lot of the issues here stem from differences in how browsers handle iframe's.

For most modern browsers, as long as you're not calling content from Java or anything in that manner, you should expect it to be fairly quick to load. Especially if you're calling this as a resource from the same server.

Beyond that there are plenty of cases where it may have a noticeable load separation. Older computers, older browsers, slower connections, etc.

And the only reason I might discourage it is that passing information to and from the iframe from your main page is going to incur more scripting calls, and thus a possibility of slowing the functionality of the page down.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.