简单的判断，兼容localstorage