0

So I am working on an intranet web application that needs some information from another web application. So I planned to use local storage for this over passing through URL. So is there any way to achieve this? Both application is deployed in same domain eg: www.abcd.com.

1st one URL will be www.abcd.com/first

2nd one will be www.abcd.com/second

Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
  • 3
    Does this answer your question? [use localStorage across subdomains](https://stackoverflow.com/questions/4026479/use-localstorage-across-subdomains) – Harsha Venkataramu Jul 06 '20 at 11:56

1 Answers1

0

I would implement a localStorage API if I were you, implementing the following functions:

  • Get
  • Set
  • Clear

All the applications would communicate with this API, so, if one of your applications makes a change on the localStorage of a user and stores it in the API, then the API would be aware of that change upon starting from the next request from any other application.

I would also implement a client-side shared by all the applications you have which would handle the localStorage in the browser and would send requests to the API I have mentioned above.

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175