+ Start a Discussion

Visualforce page embedded on Account page - bug in HTML generator?

I'm seeing an issue in Safari when I have a Visualforce page embedded on the Account record and the Visualforce page consists of a component in combination with either the page itself or the component containing an





I've tested this in Firefox 3, IE 6 and Google Chrome - they all behave as I would expect them to, i.e. they show the Account page with my small VF piece embedded.

The problem I'm seeing is that almost (scary, huh?) every time I display the page in Safari, Safari pops up a dialog box asking what to do about the servlet.integration file Salesforce is offering it, i.e. do I want to save it, open it or just cancel altogether. To make matters worse, once every 10 to 20 times(?) the page renders correctly and shows my VF page embedded on the page layout. Hey, what the...?


I've narrowed down the code to this minimalistic (and not that very useful) 3-piece code collection. One custom Controller, one Component using the Controller and one Visualforce page showing the Component plus a form.


The Controller

public class TheController {
//It seems there needs to be something instantiated in

//the controller to trigger issue in Safari.

//If left empty, there's no issue in Safari, however the

//functionality becomes somewhat limited =)
Integer aVar=1;


The Component

<apex:component controller="TheController">
Some text and tags, does not matter...


The Visualforce page

<apex:page standardController="Account" tabStyle="Account" >
<!-- The combination of a custom component and a form (either here
in the page, or within the component itself) triggers an issue
in Safari.
Instead of showing the inline VF page, it asks if I want to
download the servlet.integration file
Remove either the custom component or the form tag and the
issue disappears.
No problems either way in Firefox 3, IE 6 or Google Chrome.
<c:TheComponent />
<apex:form />



Am I doing something forbidden here?

Is my installation of Safari ready to be put to sleep?

Am I losing my mind?

If none of the above, why is Force.com compiling this to a piece of HTML that Safari doesn't understand? And most of all, why isn't it consistent, i.e. always repeatable?


Any suggestions, questions etc are more than welcome!



//Johan Liljegren

Message Edited by JohanLiljegren on 01-22-2009 11:17 AM

I just got off the phone with my support rep about this.


At first he was not able to re-produce the issue in his installation of Safari, but after having refreshed the page back and forth and going from account to account he also got the popup asking if he wanted to open or save the servlet.integration file. He tried upgrading to the latest version of Safari (3.2.1) and he kept getting the popup every time he refreshed. Very weird!


He also mentioned that Safari is only officially supported on Mac, not Windows. Interesting. Of course, most of the things should still work, but it's something to consider if you're thinking of switching to Safari for your day-to-day SFDC work.


He was going to escalate the case to the developer team and get back to me. I'll post any updates I find on the issue.


I am not sure what is going on here either yet - an inlined VF page is served into an iframe in an interesting way The actual content is generated on initial container page request and embedded in the body of that response and then we "reflect" it off the Integration servlet - has to do with a number of things - one of which is turning n + 1 heavy requests into 1 heavy and n lightweight reflection requests where n is the number of inlined pages. We also do this wackyness to support serving pages from a separate domain to leverage the browser security model. It is possible that this mechanism is making something unhappy in Safari on Windows.


Not sure about that statement about Safari support only on OSX either - looking into that - especially since I do much of my Safari testing on virtual boxes running XP/Vista/Windows7.


Hi Doug,


Thanks for your answer.


This case was closed by support, and the only answer was "Safari is not supported on Windows."

I've tried comparing the output HTML from a page load where this works as expected on Safari/Windows and the HTML from a page load where it doesn't (about every 10-15 times it works...), but I can't seem to find any obvious differences.


If you want to try it out in my sandbox, there should be enough information in Case# 02382577 to get you going. If not, let me know.


If you want to email me directly, my contact details should be available through the above Case.



//Johan Liljegren