'Google Chrome doesn't allow storage

In order to save grid configurations and some simple settings, I use localStorage.

It works on many browsers except on Google Chrome.

By the way, it doesn't work on pcs which are under our local domain.

On the same network, on a PC not under the domain, it works.

Any idea, please?

Here is whet I do (I use Devextreme datagrid's standard functions and I have the same result) :

     function toggleCustomerRightPanel(state) {
        if (state) {
            $("#customerRightBar").animate({ width: "show" });
            localStorage.setItem("capronCrmActionBar", state);
            $("body").css("margin-right", "250px");
        } else {
            localStorage.removeItem("capronCrmActionBar");
            $("#customerRightBar").animate({ width: "hide" });
            $("body").css("margin-right", "0px");
        }
    }




    function setCustomerActionBarState() {
      if ($("#mainContent").is(":visible") && localStorage.getItem("capronCrmActionBar")=="true") {
         $("body").css("margin-right", "250px");
      }
      else {
         $("body").css("margin-right", "0px");
      }
    }

When I change something on the application, I see on Chrome storing the data. For exemple :

enter image description here

But, when I close the browser and reopen it, the data is cleared. For exemple on Opera or Firefox, it works.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source