Browscap module (https://www.drupal.org/project/browscap
$.cookie('width_res', $(window).width()); // adds width resolution to our cookied
console.log($.cookie('width_res')); // => "our browser width"
All you need then in order to have access to this jquery cookie created variable within php is just to add the Jquery cookie library before you try to access the variable with $_COOKIE.
drupal_set_message('here is the Cookie var: '.$_COOKIE['width_res']);
And you are ready.