aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlouise <louise>2009-11-19 15:09:01 +0000
committerlouise <louise>2009-11-19 15:09:01 +0000
commit3b10175c1edc6568d0608c345c95998c1b9f5c79 (patch)
treeceb8d32ab77dc02c0c7b1ffeef3862f62bad110a
parent366afbaf71f07aaa7043bfd7566c1c80115620bf (diff)
Add a cache control header to ajax
-rwxr-xr-xweb/ajax.cgi6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/ajax.cgi b/web/ajax.cgi
index aa640a854..59c4a03d6 100755
--- a/web/ajax.cgi
+++ b/web/ajax.cgi
@@ -6,7 +6,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: ajax.cgi,v 1.16 2009-11-16 10:55:42 louise Exp $
+# $Id: ajax.cgi,v 1.17 2009-11-19 15:09:01 louise Exp $
use strict;
use Standard;
@@ -84,7 +84,9 @@ sub main {
#}
#my $f_list = $list;
- print $q->header(-charset => 'utf-8', -content_type => 'text/javascript');
+ # For now, assume this is not cacheable - may need to be more fine-grained later
+ print $q->header(-charset => 'utf-8', -content_type => 'text/javascript', -Cache_Control => 'max-age=0');
+
$pins =~ s/'/\\'/g;
$om_list =~ s/'/\\'/g;