Permalink
Browse files

Fixed working with cookie in process - added back ifStructKeyExists a…

…nd applied the send mobile_first fallback at end of if statement
  • Loading branch information...
1 parent ca90026 commit 5994ead71f7e3254b30b04d20a4be0cb47fa306c @GiancarloGomez GiancarloGomez committed Dec 29, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 adaptive-images.cfm
View
@@ -184,8 +184,8 @@
resolution = url.width;
res_directory = resolution;
}
- // work with the cookie value
- else{
+ // work with the cookie value if exists
+ else if (structKeyExists(cookie,"resolution")){
write_log("AI: cookie.resolution=#cookie.resolution#");
for(res in resolutions) {
write_log("AI: res=#res#");
@@ -194,8 +194,11 @@
res_directory = resolution;
}
}
+ // send mobile first
+ }else if(mobile_first){
+ resolution = resolutions[arrayLen(resolutions)];
}
- // resolution set :emd
+ // resolution set :end
write_log("AI: res=#resolution#");

0 comments on commit 5994ead

Please sign in to comment.