code: function() {
        try {
          return navigator.cookieEnabled ||
            ("cookie" in $document && ($document.cookie.length > 0 ||
            ($document.cookie = "test").indexOf.call($document.cookie, "test") > -1));
        } catch (e) {
            $rootScope.$broadcast('LocalStorageModule.notification.error', e.message);
            return false;
        }
      }
docs: Checks the browser to see if cookies are supported