Steps to reproduce
but it works if you read the page via the network at the adress:
Comments and activity
- Microsoft Edge Team
Changed Assigned To to “Steven K.”
I believe this is “working as designed” and is due to the ambiguity in local file’s URI origin. Quoting the link below:
URIs are considered to be same-origin. In other words, any HTML file on your local disk can read any other file on your local disk."
The request violates a policy decision, or the origin is not
a valid scheme/host/port tuple(this can happen if the origin uses the
scheme, for example). For example, the user may have their browser configured to deny permission to persist data for the specified origin.”
If you want to use sessionStorage you could also host the file on a local web server. This way the origin will not be ambiguous. This method is common where an entry is added to the local hosts file to define the website’s domain under development. localhost will also work.
Hope this helps,
Thank you for your response but I think this is not due to a local file origin. I have just one file I launch directly from the windows file browser as this simple this one:
Click to test SessionStorage
I launch it in Edge at the adress:
It generates an error with Edge and no error with Chrome or Firefox.
I cannot instal a local web server as you suggest as my HTML pages are a product catalogue which is delivered on an USB key which must run without installation on the customer web browser.
The only solution I see is to pass all the parameters from one page to another through the URL which less elegant than a sessionStorage.
The complete code of my previous message masked in a comment in order to avoid interpretation.
I am assuming you are not looking for a solution that persists data after the session, is that correct? E.g. localStorage or IndexDB?
Can you send me the error you are seeing?
I found this work around for resources, perhaps related to sessionStorage.
I will investigate if there is a solution without passing via URL and if this is really “working as designed.”
For you, to test my issue, I have put the few lines of code here:
Store the code on your loacal disk and test it with Edge to see the error in the console.
Thank you for providing the repro. I am able to repro this issue, however, I still believe this is “byDesign.” I will investigate a bit more and let you know if anything changes in this regard.
Appreciate the support with this issue,
- Microsoft Edge Team
Changed Assigned To to “travil”
Changed Assigned To to “Venkat K.”
Changed Assigned To from “Venkat K.” to “Shawn P.”
Changed Assigned To from “Shawn P.” to “Cameron F.”