+ Start a Discussion
Dave MedlicottDave Medlicott 

Visualforce Page with showheader="false" flashes header for a moment

Hello all,
I am buil\ding a custom chatter profile page per this article: http://help.salesforce.com/help/pdfs/en/salesforce_profile_tabs_cheatsheet.pdf and it works beautifully for the most part. However, if the following is my visualforce page:

<apex:page showHeader="false" standardcontroller="user"  docType="html-5.0">
   <apex:outputlink value="https://cs16.salesforce.com/_ui/core/userprofile/UserProfilePage?u=00530000001t1ufAAA&tab=Test" style="font-size:18px;font-weight:bold;color:blue;">Dave</apex:outputLink>
</apex:page>

When I click on the link, it will give a brief flash of the header before showing the page without a header. Of course,  '00530000001t1ufAAA' is a specific user profile in my instance. What I am trying to do is put up some user specific data including a link to the profile page of another user. It works great except for that littlle header flash.

Any ideas?

Thanks, Dave
NehalNehal (Salesforce Developers) 
Hi,

You need to take of few things that is you need to update your profile apps to use the "showHeader=false" preference in the main Visualforce page tag. This will suppress page headers and footers.

If the profile app you develop calls another Visualforce page, the target page must also
contain the ""showHeader=false"" preference, so that Salesforce page headers do not
suddenly appear. Alternatively, if you don’t manage the code for that target page, you
should pass the isdtp=nv parameter (headerless parameter) into the page when you
invoke it to suppress headers and footers.

I hope this helps.
Dave MedlicottDave Medlicott
Thanks. I ended up replacing the apex:outputlink with apex:commandlink specifying an action and passing in the users id in a param. In my controller code for the action, I built a new page reference using the user id that is passed. When that loads, it only refreshes the page within the tab and not the entire page like clicking on the outputlink did.