views:

30

answers:

2

Can you setup a variable for javascript in one page and have another page load and still have it recognize the variable?

+2  A: 

No.

Instead, you can use cookies.

You can also use Offline Storage, but that's not supported by older browsers.

SLaks
+1  A: 

there are some javascript-frameworks (e.g. persistjs and dojo storage) which allow to do cross-browser persistent storage of variables (using a variety of backends such as html5 localstorage, ie userbehavior, google gears, flash). better then native localstorage (as that is not supported by all browsers) and better then cookies (as they get sent back and fro with every request and response).

hope this helps

futtta