From 206d9ada48b460f5f7bd74d546809554b7d4a2c8 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Tue, 24 May 2011 10:18:17 -0400 Subject: [PATCH] updated cookie so it sets the width again --- responsiveimgs.js | 2 +- responsiveimgs.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/responsiveimgs.js b/responsiveimgs.js index f4c9277..a2616e6 100644 --- a/responsiveimgs.js +++ b/responsiveimgs.js @@ -19,7 +19,7 @@ //record width cookie for subsequent loads date = new Date(); date.setTime(date.getTime()+(5/*5 sec*/*1000)); - doc.cookie = "rwd=y; expires=" + date.toGMTString() +"; path=/"; + doc.cookie = "rwd-resolution=" + screen.width + ";expires=" + date.toGMTString() +"; path=/"; //if wideload is false quit now if( !wideload ){ diff --git a/responsiveimgs.min.js b/responsiveimgs.min.js index 0fd74e2..b2d8bc2 100644 --- a/responsiveimgs.min.js +++ b/responsiveimgs.min.js @@ -5,4 +5,4 @@ * Dual licensed under the MIT or GPL Version 2 licenses. * Check out the README.md file for instructions and optimizations */ -(function(f){var i=f.rwd_images||{},c=i.widthBreakPoint||480,g="rwd-imgs-lrg",e=f.screen.availWidth>c,d=location.href,j=d.substring(0,d.lastIndexOf("/"))+"/",k=f.document,h=k.getElementsByTagName("head")[0],b=new Date();b.setTime(b.getTime()+(5*1000));k.cookie="rwd=y; expires="+b.toGMTString()+"; path=/";if(!e){return}k.documentElement.className+=" "+g;var a=(function(){var o,n=false,m=k.createElement("a"),l=false,p=h.getElementsByTagName("base")[0]||(function(){n=true;return h.insertBefore(k.createElement("base"),h.firstChild)})();o=!n&&p.href;p.href=location.protocol+"//x/";m.href="y";if(m.href.indexOf("x/y")<0){if(o){p.href=o}else{h.removeChild(p)}p=null}else{p.href=j+"rwd-router/"}return p})()})(this); \ No newline at end of file +(function(f){var i=f.rwd_images||{},c=i.widthBreakPoint||480,g="rwd-imgs-lrg",e=f.screen.availWidth>c,d=location.href,j=d.substring(0,d.lastIndexOf("/"))+"/",k=f.document,h=k.getElementsByTagName("head")[0],b=new Date();b.setTime(b.getTime()+(5*1000));k.cookie="rwd-resolution="+screen.width+";expires="+b.toGMTString()+"; path=/";if(!e){return}k.documentElement.className+=" "+g;var a=(function(){var o,n=false,m=k.createElement("a"),l=false,p=h.getElementsByTagName("base")[0]||(function(){n=true;return h.insertBefore(k.createElement("base"),h.firstChild)})();o=!n&&p.href;p.href=location.protocol+"//x/";m.href="y";if(m.href.indexOf("x/y")<0){if(o){p.href=o}else{h.removeChild(p)}p=null}else{p.href=j+"rwd-router/"}return p})()})(this); \ No newline at end of file