Permalink
Browse files

Ad cookies expire in 10 years

  • Loading branch information...
jeffkreeftmeijer committed Jun 15, 2012
1 parent 325e69b commit afd3c7e94700d0277441cf1984254c8844142fa4
Showing with 4 additions and 1 deletion.
  1. +4 −1 _layouts/default.html
View
@@ -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]);

0 comments on commit afd3c7e

Please sign in to comment.