Skip to content

Commit

Permalink
Fixes issue #1 re: cahcing.
Browse files Browse the repository at this point in the history
  • Loading branch information
mheadd committed May 4, 2013
1 parent 42d883c commit 1d6d335
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
RewriteEngine on
RewriteBase /

Header set Cache-Control "max-age=604800, public"

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d

Expand Down
5 changes: 0 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ function generateResponse($name, $callback, Array $parameters=array()) {

$response = json_encode(getData($name, $parameters));

// Caching headers
header('Cache-control: public');
header("Pragma: cache");
header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 12000) . " GMT");

if($callback) {
header('Content-type: application/javascript');
return "$callback($response);";
Expand Down

0 comments on commit 1d6d335

Please sign in to comment.