Browser Contexts

The browser context in WML is the set of all variables currently set, together with the history stack (the list of all the cards the user has recently visited).

The context is emptied (all variables are unset, and the stack is emptied) when a card is displayed with the newcontext attribute set to true. See Chapter 6, for more on cards and their attributes.

In addition, whenever the user sends the browser to a new location that wasn’t referenced in the current card (for example, by selecting a bookmark, entering a new URL, or viewing an initial home card), a new context is created. Some browsers support multiple contexts, in which case it may be possible to get back to the previous context somehow. But many support only one, meaning that this is equivalent to emptying the context permanently. This new context action doesn’t happen if the new URL came from executing a task, only if it came from some external source.

Get Learning WML, and WMLScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.