Force.com Site Popups using Include Being Cached

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
  • (Edited)
I was having a problem where a popup dialog that used a page include was getting cached, but only when viewing the page on a Force.com Site. So, even if data was updated, the dialog would still show old data - it was cached for 10 minutes.

I was able to fix this problem by adding cache="false" to the Apex Page Include that I copied from the Skuid one.

<apex:page controller="skuid.Ui" sidebar="false" showHeader="false" readonly="true" standardstylesheets="false" doctype="html-5.0" cache="false">
<!-- Load in external CSS files using link tags --> <apex:outputText value="{!cssLoads}" escape="false" /> <!-- Load local/page/inline CSS --> <style>{!css}</style> <!-- Build the HTML DOM of our page --> <apex:outputText value="{!html}" escape="false" /> <!-- Load in external JS files using script tags with src attribute --> <apex:outputText value="{!jsLoads}" escape="false" /> <script class="nx-include-scripts"><apex:outputText value="{!js}"/></script> </apex:page>
It appears this has been fixed in a later Skuid version of the Include Page but for anyone else tearing their hair out trying to debug this issue I thought it was worth posting this quick fix here.
Photo of Tony Sirna

Tony Sirna

  • 976 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,240 Points 5k badge 2x thumb
Hi Tony~

Thanks for sharing your workaround for this!

Karen