Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I am trying to get Visualforce pages with as clean HTML as possible. We have to meet a bunch of requirements for a customer, and are trying to remove as much as HTML additions added by Visualforce as we can.

Templates and pages were no issue, the bulky HTML generated for components could be disabled by using the layout="none" attribute, but I'm left with a little piece that I have not found to remove from my page. Added tags being the script and meta tags.

<!DOCTYPE HTML>

<html>
    <head>
<script src="/jslibrary/1344459698000/sfdc/JiffyStubs.js"></script><meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE" />
<meta HTTP-EQUIV="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT" />

        this txt is located in the template

        this txt is located in the page (header define section) 
    </head>
    <body>
        <p> this txt is located in the page (body define section) </p>

this txt is located in a component
    </body>
</html>

The Javascript doesn't seem to contain a lot of functionality:

var Jiffy={measure:function(){},mark:function(){},stat:function(){}};

The meta tags are in relation to cache I guess, yet setting the page attribute cache to false doesn't have an impact. Can anyone explain the functionality of these additions, whether I can avoid having them on the page, or why they are important enough to Visualforce's functioning to keep them on there (if removal is possible).

update: my Visualforce page is defined as following:

<apex:page docType="html-5.0" showHeader="false" standardStylesheets="false" sidebar="false"  cache="false">
share|improve this question
add comment

2 Answers 2

The Jiffy javascript is used for gathering performance metrics from visualforce pages by the salesforce team. There is no way to remove the script from visualforce pages.

It shouldn't impact end user performance or functionality at all.

share|improve this answer
1  
An idea on the meta tags ? W3C considers them invalid in the latest validator, we've been given rather strict requirements html output wise. –  Samuel De Rycke Oct 10 '12 at 19:08
    
You might want to look at the cache attribute on the page. I'll experiment and see if I can find anything useful. –  Ryan Guest Oct 11 '12 at 20:11
1  
JiffyStubs only contains the minimal function stubs (as referenced in other SFDC scripts) to prevent errors when performance is not being actively logged. More info on jiffy-web can be found here: jiffy-web –  Mark Pond Dec 13 '12 at 19:22
add comment
up vote 3 down vote accepted

As mentioned by Ryan Guest, the jiffy script can not be removed. It is not added to an empty page, but as soon as there is anything rendering HTML output the script is added.

However, the meta tags can be removed.

<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE" />
<meta HTTP-EQUIV="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT" />

These dissapear when the cache attribute is explicitly set to true. Eventhough the documentation states that "true" is the default value, not setting it to "true" will result in Visualforce adding these meta tags to the page. Setting the argument to "false" will also result in Visualforce adding the meta tags.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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