-3

I would like to access website A's localstorage from website B's script, how could I do that?

If that is not possible in any way how could I save a string from website A (using a JS script) to my computer and how could I read it from website B's script?

Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39
H1N1virus
  • 51
  • 5
  • 1
    Do you want to save it on the client computer or the server? – Barmar May 12 '20 at 21:06
  • 1
    What code have you written already? Please have a read of [this guide on producing code for a good quality question](https://stackoverflow.com/help/minimal-reproducible-example), then include and mark up your code in your question. Cheers! – Joundill May 13 '20 at 01:32
  • 1
    @Barmar client computer – H1N1virus May 13 '20 at 07:58
  • 1
    @Joundill I haven't written code yet. Because I can't write code without these informations. – H1N1virus May 13 '20 at 08:06

1 Answers1

1

One possible option is to make a .txt file in the same root directory and provide its path to where you want to use the string. If you want to use it in a javascript file, you can refer: How to read text file in JavaScript

I hope this helps!

Rishabh Sharma
  • 169
  • 1
  • 3