Access to the Indexed Database API is denied in this context
问题 I'm getting an exception when I try to access IndexedDB in Chrome with Service Workers. I'm not using a web server so I execute my html files locally onto browser so my url is something like file:///D:/Dev/web/sample-sw/index.html I don't know why the code works on Firefox but it doesn't on Chrome. This is the exception: Unhandled rejection: OpenFailedError: SecurityError Failed to execute 'open' on 'IDBFactory': access to the Indexed Database API is denied in this context. My index.html is