views:

44

answers:

2

Is there any way to define a variable that can be used in multiple Web pages? For example, a string variable stores a certain value in page A and that value can be accessed in page B. I know cookies can do it. Is there any other way?

+2  A: 

In descending order or support: Passing it in the URI, cookies, frames, HTML5 storage

Cookies are the sensible approach. It is what they were designed for.

David Dorward
+1  A: 

window.name can also hold about 2MB of data as a string.

See: http://www.thomasfrank.se/sessionvars.html

Diodeus