Quote:
Your script may be generating a HTML/JS page which is sent to the browser, containing code which interacts with LocalStorage, but the CGI script itself is not storing any value.
|
Correct. This is the case and I have not explained myself clearly.
There is say Page1.html (as seen by the server as 'index.html') containing a Form calling "make_page2.cgi" which generates and returns Page2.html.
The same Javascript code (copied and pasted) in both Page1.html and Page2.html gives different results with one finding the key/value pair in localStorage while the other finds it is null.
My question was: is this to be expected due to the differences of transport to the client? If the answer is no (as all info on the subject seems to suggests) then I need to dig further to find the cause.
Unfortunately, as I previously explained, this digging is not justified although other readers may want to learn something from this. I was expecting to become aware of a simple 'gotcha' while there may be none.