Error message "SCRIPT5: Access is denied" occurs while trying to access websites that utilize LocalStorage

One of our clients is experiencing an "SCRIPT5: Access is denied" error while accessing websites on Windows 8.1/IE11. This issue is isolated to one client, not affecting all users.

The error message indicates a failure while trying to access

_global.localStorage

The client mentioned that adding our site to the "Trusted Sites" list resolves the issue. However, we are unable to replicate this problem in any of our development or test environments despite using the same OS and IE version as the client. We have attempted various solutions such as enabling/disabling DOMStorage, Advanced Protection Mode, and Protection Mode without success. More information can be found here:
Access Denied for localstorage in IE10

Our current hypothesis is that a setting or group policy enforced by the client's IT department may be causing this issue rather than a code-related problem since it works fine for all other clients.

My question is:

What settings, domain policies, or group policies could I check to replicate this error?

How can I resolve this issue without modifying any code? Since the client has over 1000 users, relying on IT to adjust policies is the preferred solution rather than requiring each user to add the site to their "Trusted Sites" list.

Is there anything else I should investigate?

Any assistance would be greatly appreciated.

Answer №1

Dealing with a similar issue, I found a solution that worked for me:

let dataStore;
try {
  dataStore = localStorage; // will throw an error if not supported by the browser
} catch(error) { // catching this error and setting up a fallback
  let innerDataStore = {};
  dataStore = {
    getItem: function(key) {
      return innerDataStore[key];
    }, 
    setItem: function(key, value) {
      return innerDataStore[key] = value;
    }, 
    removeItem: function(key) {
      delete innerDataStore[key];
    }
}

Warm regards, Aleh

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Troubleshooting: WordPress integration with PhoneGap not processing JSON data

I've been following a tutorial and I'm encountering some issues with the examples provided. Despite my attempts to run the examples, I am not seeing any results: app.html <!DOCTYPE HTML> <html> <header> <script src="https:/ ...

Retrieve data from a JSON file using Ajax and jQuery

I have a JSon file that contains information about some matches: [{ "id": "2719986", "orario": "00:30", "casa": "Bahia", "trasferta": "Internacional" } , { "id": "2719991", "orario": "02:00", "casa": "Palmeiras", "trasferta": "Botafogo RJ" }] I'v ...

Troubleshooting the issue with Devbridge JQuery Autocomplete's functionality when using the service

I'm currently working on integrating the devBridge autocomplete feature, but I'm facing an issue with ajax. It works fine when I manually input a json object without using PHP, but my requirement is to fetch data from a database. PHP CODE: < ...

How can I prevent my copy variable from altering the original value variable in Node.js?

Why is it that when I change a variable that is a copy of another variable, both are affected? This concept doesn't seem logical to me. Can you please explain why this happens? It's my first time encountering this behavior in node.js. I am famili ...

Issue encountered while attempting to remove a row from a table (JavaScript)

I'm encountering an error when attempting to delete a table row: "Uncaught ReferenceError: remTable is not defined index.html:1:1". When I inspect index.html to identify the issue, I find this: remTable(this) This is my code: const transact ...

Obtain a particular value from a JSON file using JavaScript

My JSON file, named json.json, contains the following data: {"name1":"Hallo","name2":"Defy","name3":"Carm","name4":"Disney"} To read this file, I am using the following script: <script type='text/javascript'> $(window).load(function(){ $ ...

Encase all jQuery functionalities within a custom class

I am looking to create a JavaScript class that encapsulates jQuery's DOM functions, but I want these functions to only interact with a single property of that class. class Foo { constructor() { this.$wrapper = $('<div>wrapper</div ...

Using Python to extract the audio URL (specifically in mp3 format) from a web player

I have been attempting to extract the URL link from a webpage in order to download the audio as an mp3 file, but so far I have not been successful. Here is the code snippet of the webpage: webpage code Specifically, I am trying to retrieve the value of t ...

Is it advisable to steer clear of promise-based recursive rendering?

Here is my simplified React component: import React from "react" import {useSelector, useDispatch} from "react-redux" import { useRouteMatch } from "react-router-dom" import gameService from "../services/game" import ...

Converting a button from non-favorite to favorite in Angular: Step-by-step guide

How can I change the state of a button that is inside * NgFor when consuming an API? The issue arises when I try to toggle the favorite status from one to another, as it changes all buttons instead of just the one clicked. Is there a way to maintain the st ...

How should you proceed when npm install cannot locate a specific dependency, even though you can easily download it manually?

Currently, I am faced with a dilemma while attempting to execute a JavaScript file that is accompanied by a package.json file. The issue arises during the npm install command in the folder as it fails to locate one of the dependencies. To address this pro ...

Resolving the ENOTFOUND error in Imgur API call: 443

I keep getting the same error message every time I execute the node.js code below. As someone who is new to working with Authorization Headers in node.js, I must be overlooking something. Can someone offer assistance or direct me to reliable documentatio ...

Exploring the compatibility of Husky with Typicode using Yarn

Currently, I have implemented the use of husky to configure git hooks for prettier. However, I am facing a persistent issue whenever I attempt to commit or push: > husky - Can't find npm in PATH. Skipping precommit script in package.json My curre ...

Tips for creating an array within an AngularJS Service and effectively sharing it across two controllers

I have two controllers, FirstController and SecondController, along with a service defined as follows: app.factory('Data', function(){ return []; }); In both controllers, I am utilizing the service in this manner: app.controller("FirstCont ...

Issue with module.exports entry in Webpack configuration causing errors

I've been working on setting up webpack but I've hit a roadblock due to this error message. It seems like there's an issue with the entry configuration. When I try to add it without specifying a path, as shown in the tutorial, I receive the ...

Tips for integrating a new module into the SystemJs configuration file for seamless importing in Angular

Is there a way to incorporate newly downloaded packages from npm into my Angular 2 components using SystemJS and the system.config.js file provided by a starter package? I've attempted to include links to the modules in the map and packages sections o ...

Learn how to efficiently manage XHR requests one after the other in ExtJS 4.1 without relying on synchronous requests

My software relies on a sophisticated database structure with numerous foreign key constraints, leading to multiple callback handlers in my JavaScript code. One simple action like creating a new order might require three XHRs to submit all the required dat ...

What is the most efficient way to transfer data to another page without having to repeatedly retrieve it from a

Looking for a way to pass additional data to another page when clicking on an item. I attempted to extend the father class to the child class, but it significantly slowed down the process due to the frequent class calls. This application is a dashboard w ...

Pinia throws a useStore is not callable error

I have been trying to resolve the issue with (0 , pinia__WEBPACK_IMPORTED_MODULE_1__.useStore) is not a function but unfortunately, I haven't been able to find a solution. Can anyone point out what mistake I am making? Here is my store.js code: im ...

Positioning Multi-level Drop Down Div in Javascript - How to do it efficiently?

I'm currently working on a horizontal menu using CSS and JavaScript with multiple levels. I've implemented a toggle function to show the submenu container, but it's causing the links below it to be pushed down. Is there a way to make the dis ...