Skip to content

Commit

Permalink
Ad cookies expire in 10 years
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Kreeftmeijer committed Jun 15, 2012
1 parent 325e69b commit afd3c7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ <h2>{{ page.title }}</h2>
}

if(!adSlot) {
expiryDate = new Date;
expiryDate.setFullYear(expiryDate.getFullYear() + 10);

adSlot = new Date().getSeconds() % 2;
document.cookie = 'jk-ad=' + adSlot;
document.cookie = 'jk-ad=' + adSlot + '; expires=' + expiryDate.toGMTString( ) + ';';
}

document.write(ads[adSlot]);
Expand Down

0 comments on commit afd3c7e

Please sign in to comment.