/    Sign up×
Community /Pin to ProfileBookmark

Local Storage in Start Page

Hi,

I’m trying to develop my HTML/CSS/JS skills by first creating a start page that is run and stored locally. It will feature bookmarks and data from 3rd party APIs, such as current weather. I’ve run into an issue with local storage, though. Apparently, it will not work when run from the desktop. What alternatives are there? I’ve thought of using IndexedDB but that seems a bit overkill for the simply data I need to store.

Thanks in advance for your help!

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@rootJun 15.2018 — [[2],[2,4]]
Copy linkTweet thisAlerts:
@rootJun 15.2018 — localStorage certainly does work on the local machine and as a standalon page run from a path...
Copy linkTweet thisAlerts:
@Duke17authorJun 15.2018 — Thanks, root. Here is the error I received:

Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

at file:///C:/Startpage/weather.js:8:32

Is there a setting in Chrome I need to enable for it to work?
Copy linkTweet thisAlerts:
@SempervivumJun 15.2018 — Check if this helps you:

https://www.chromium.org/for-testers/bug-reporting-guidelines/uncaught-securityerror-failed-to-read-the-localstorage-property-from-window-access-is-denied-for-this-document
Copy linkTweet thisAlerts:
@rootJun 15.2018 — I have no issues with it on my system.

Maybe posting the code around that line number would help.

> @Duke17#1593000 file:///C:/Startpage/weather.js:8:32
Copy linkTweet thisAlerts:
@Duke17authorJun 17.2018 — Thanks, Sempervivum. I adjusted that setting in Chrome and it worked perfectly.
×

Success!

Help @Duke17 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...