Results 1 to 4 of 4

Thread: LocalStorage - Multiple applications on the same domain issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Apr 2012
    Vote Rating

    Default Answered: LocalStorage - Multiple applications on the same domain issue

    Hey Sencha world,
    On the same domain I run my app which is basically an e-commerce app with a shopping cart where items are saved in the localStorage.

    The app takes a company parameter on startup.

    If I run the app as company A, I have some products stored into the localstorage.
    Now, I run the same app as company B (= differents products), I still have the old company A's products referenced in the same localStorage.

    As a result, if I add a product to my shopping cart, I end up with product refs from company A and B which is obviously not acceptable..

    My idea of what's happening:
    The localStorage is shared between the two companies because the app is running on the same domain with the same localStorage identifier. The solution might be to have different localStorage ids for each company.

    But, how can I do it?

    Thanks in advance for any answer.

  2. Make the localstorage proxy id dependent on Company id.

    proxy:{ type:'localstorage', id :'storedProducts-'+companyId}

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts