Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use max-age=0 to restrict caching. #3

Merged
merged 1 commit into from

2 participants

@xiongchiamiov

The previous Cache-Control header didn't prevent Chrome, at least, from
caching the pixel.gif response, which meant that statistics wouldn't get
accurately recorded.

@xiongchiamiov xiongchiamiov Use max-age=0 to restrict caching.
The previous Cache-Control header didn't prevent Chrome, at least, from
caching the pixel.gif response, which meant that statistics wouldn't get
accurately recorded.
4406579
@xiongchiamiov xiongchiamiov referenced this pull request in xiongchiamiov/xiongchiamiov.github.com
Open

Build a better portfolio #5

@jashkenas jashkenas merged commit e4bf561 into documentcloud:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 8, 2012
  1. @xiongchiamiov

    Use max-age=0 to restrict caching.

    xiongchiamiov authored
    The previous Cache-Control header didn't prevent Chrome, at least, from
    caching the pixel.gif response, which meant that statistics wouldn't get
    accurately recorded.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/pixel-ping.js
  2. +1 −1  src/pixel-ping.coffee
View
2  lib/pixel-ping.js
@@ -89,7 +89,7 @@
pixel = fs.readFileSync(__dirname + '/pixel.gif');
pixelHeaders = {
- 'Cache-Control': 'private, no-cache, proxy-revalidate',
+ 'Cache-Control': 'private, no-cache, proxy-revalidate, max-age=0',
'Content-Type': 'image/gif',
'Content-Disposition': 'inline',
'Content-Length': pixel.length
View
2  src/pixel-ping.coffee
@@ -81,7 +81,7 @@ pixel = fs.readFileSync __dirname + '/pixel.gif'
# HTTP headers for the pixel image.
pixelHeaders =
- 'Cache-Control': 'private, no-cache, proxy-revalidate'
+ 'Cache-Control': 'private, no-cache, proxy-revalidate, max-age=0'
'Content-Type': 'image/gif'
'Content-Disposition': 'inline'
'Content-Length': pixel.length
Something went wrong with that request. Please try again.