Skip to content

Instantly share code, notes, and snippets.

@csusbdt
Last active December 10, 2015 00:28

Revisions

  1. csusbdt revised this gist Jan 6, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ app.get('/channel.html', function(req, res) {
    'Content-Length': channelDoc.length,
    'Pragma': 'public',
    'Cache-Control': 'max-age=31536000',
    'Expires': new Date(Date.now() + 31536000).toUTCString()
    'Expires': new Date(Date.now() + 31536000000).toUTCString()
    });
    res.end(channelDoc);
    });
  2. csusbdt created this gist Dec 21, 2012.
    12 changes: 12 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    // Return Facebook channel.html with one-year expiration.
    app.get('/channel.html', function(req, res) {
    var channelDoc = '<script src="//connect.facebook.net/en_US/all.js"></script>';
    res.set({
    'Content-Type': 'text/html',
    'Content-Length': channelDoc.length,
    'Pragma': 'public',
    'Cache-Control': 'max-age=31536000',
    'Expires': new Date(Date.now() + 31536000).toUTCString()
    });
    res.end(channelDoc);
    });