CCXML 1.0-W3C Development GuideHome  |  Frameset Home

  B: Debugging Techniques  |  TOC  |  Debugging Techniques  

Caching Tips and Techniques

Document caching seems to be a very misunderstood issue when it comes to the development process; having a cahed version of a page that you are developing can be very frustrating at times, so let's run over the basics to cache control. Firstly, the absolute best way to control caching is via your server settings. If you are hosting on your own webserver, then you have it made...all you need to do is to carefully read the caching tutorial in order to learn the correct procedure for setting up your server's caching headers. Not sure if it's set up properly? Point your browser to this cacheability tool, and enter in the URL of your application to make certain that you have your Expires and cache-control headers set properly.

However, you might not have full control over the headers that your webhost returns, so we have a few other possibilities. If your webhost supports any server-side languages such as ASP, ColdFusion, Perl, etc, we can simply add explicit cache control headers within your code:

Disabling caching in Active Server Pages

<% response.expires = -1
response.CacheControl = "no-cache"
%><? xml version="1.0" ?>


Disabling caching in PHP

<?php
header('Cache-Control: no-cache');
print('<?xml version="1.0" encoding="UTF-8" ?>');
?>


Disabling caching in Cold Fusion

 
<cfheader name="Cache-Control" value= "no-cache">
<cfheader name="Expires" value="#Now()#"><? xml version="1.0" ?>





  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login
  B: Debugging Techniques  |  TOC  |  Debugging Techniques  

© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site