Solprovider Lenya Kongregate Registration for Free Flash Games and Chat with solprovider

Browser Cache Issues with Kupu

This was a really difficult issue that was making us crazy. Kupu works fine using Mozilla on my PC, but a content editor using Firefox in an office had to click "Refresh" after every change. Some of the pages errored, but refreshing would show the proper results. Many pages would return the old values, but refreshing would show the proper values. Setting Firefox to not cache at all did not make a difference.

This solution is stolen from Josias Thoeny's posting on 2005-10-04 to the Lenya User Mailing List. It fixes the page displayed by Kupu for editing. I have not confirmed it works yet, and it is probable the patch needs to be added to other files to fix all the issues.

FILE: build/lenya/webapp/lenya/usecases/kupu/usecase-kupu.xmap

<!-- Requested by Kupu to load the document into the editor -->
<map:match pattern="content" type="step">
<map:match pattern="*/authoring/**">
<map:generate src="{global:basedir}/pubs/{1}/content/authoring/{page-envelope:document-path}"/>
<map:transform
src="{fallback:resources/kupu/apache-lenya/lenya/content2edit.xsl}">
<map:parameter name="css"
value="{page-envelope:context-prefix}/{1}/authoring/css/page.css"/>
<map:parameter name="nodeid" value="{page-envelope:document-node-id}"/>
</map:transform>
<map:transform src="{global:basedir}/xslt/util/strip_namespaces.xsl"/>

<!-- Fix Browser Caching : BEGIN -->
<map:act type="set-header">
<!-- prevent caching in the browser -->
<map:parameter name="Cache-Control" value="pre-check=0" />
<map:parameter name="Expires" value="-1" />
</map:act>
<!-- Fix Browser Caching : END -->

<map:serialize type="html"/>
</map:match>
</map:match>


<< ContentsAlignment >>

Contact Solprovider
Paul Ercolino