FuseBox and caching

Within our application we make full use of the latest FuseBox release together with ColdFusion 8 and the integrated Ajax functionality.

Lately we have been working on a "bug" where the language (when switched) is stored in a session variable and the pages displayed accordingly to the selected language. Now, what has happened is that the session variable has been set, but the pages did not display in the selected language.

First off, we thought that the session variables have been lost or the cftokens not passed correctly. But then after a while we figured that when one refreshes the cache of the browser the pages show in the correct language.

Thus it all boiled down, that we had to tell the browser not to cache the pages. this we achieved with the <cfheader> tag, like;

<cfheader name="Expires" value="#GetHttpTimeString(Now())#">

<cfheader name="CACHE-CONTROL" value="NO-CACHE, no-store, must-revalidate">
<cfheader name="PRAGMA" value="#GetHttpTimeString(Now())#">

Now, the pages reflect the language change correctly and we are all happy again.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags:

About Razuna

This is the official blog of the Open Source Digital Asset Management System - Razuna. Razuna is the incredible easy way to manage all your Digital Assets. As the Open Source Alternative to Digital Asset Management (DAM) System you can save up to 90% with Razuna compared to any proprietary System. By using Razuna you get the benefit of it being free and open source and supported by a professional company. There are many options to try out Razuna today! Either, download your own version, create a free account on our Razuna Hosted Platform or get your own Razuna Cloud Server.

No comments yet.

Leave a Reply

You must be logged in to post a comment.