最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - IE8: "The system cannot find the path specified" error when acessing window.localStorage - Stack

programmeradmin2浏览0评论

I have some javascript code which accesses window.localStorage, and it's working fine on most machines, but in one of them (IE8 pat view, Windows 7 64) I get the error "The system cannot find the path specified" whenever I try to read window.localStorage. I've tried to find some discussions about it at SO and Google (no cigar) and didn't find any suspicious setting at the browser's options. Has anyone encountered this error, and a solution for it? I could put a try/catch around window.localStorage but I'd rather understand what is going on.

I have some javascript code which accesses window.localStorage, and it's working fine on most machines, but in one of them (IE8 pat view, Windows 7 64) I get the error "The system cannot find the path specified" whenever I try to read window.localStorage. I've tried to find some discussions about it at SO and Google (no cigar) and didn't find any suspicious setting at the browser's options. Has anyone encountered this error, and a solution for it? I could put a try/catch around window.localStorage but I'd rather understand what is going on.

Share Improve this question asked Nov 30, 2010 at 11:38 rodbvrodbv 5,2644 gold badges33 silver badges31 bronze badges 1
  • Did you try both 32bit and 64bit IE8? – Esailija Commented Aug 2, 2012 at 17:20
Add a ment  | 

6 Answers 6

Reset to default 1

Take a look at Which browsers support html5 offline storage.

According to that list IE8's supported. If it's only on one pc where you have the problem then check if there are plugins for that browser that might interfere.

IE8 supports local storage but IE7 and older do not. Since you're using patibility view (for who knows what reason as only IE8+ have any market share to justify consideration for unless you're on a seriously outdated corporate LAN) you're basically working with IE 5.5's rendering engine.

Use object detection to tell the client, "No." because that is what you're going to find out ultimately be it decisively or not.

It sounds to me like the pat mode is to blame. Where I work there's this irritating pany policy to support IE8, too. Whenever I run into a problem like this the quick fix is always to set the doctype to html5's <!DOCTYPE html>, which kicks IE8 in to (almost) standards mode, and gives you access to all sorts of goodies (or in IE world: lesser evils) your denied in pat/quirks mode, including window.localStorage

Why do you expect the local storage to work in IE8? IIUC, not even IE9 will support local storage API.

We are talking about HTML5 local storage, right?

If it's only in this particular machine, it's very unlikely that your code is causing the problem. It could be a software installation issue.

As far as i know there is no difference in using localstorage for a 32b or 64b browser.

One thing i don't get is the machine with a problem is a W7 64bit system. So it should have IE9. Looking at your explanation it IE runs in IE8 p mode. Why??

Things you can look at or do:

  • Browser modus and document modus if the later is quirks change it it ie8.
  • Use native ie9 not p mode.
  • Use IE with admin rights.
  • Disable view intranet sites in Compatibility View
  • Check your AntiVirus, and logs.

Install FF or Chrome on this machine if it has the same issue on this machine there is something wrong with the machine

Good Luck, let us know if you solved it and of course how.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论