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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.