You can use an access control pragma to protect a file's content. You must call the access control pragma before calling external functions. Also, having more than one access control pragma in a file will generate a compiler error.
Every time an external function is invoked, the compiler performs an access control check to determine if the destination file allows access from the caller. The access control pragma specifies domain and path attributes against which the access control checks are performed. If a file has a domain or path attribute, the referring file's URL must match the values of the attributes. Matching is done as follows:
The access domain is suffix-matched against the domain-name portion of the referring URL.
The access path is prefix-matched against the path-name portion of the referring URL.
Domain and path attributes follow the URL capitalization rules.
Domain suffix matching is done using the entire element of each sub-domain, and must match each element exactly. For example, www.wapforum.org matches wapforum.org but not forum.org.
Path prefix matching is done using entire path elements and must match each element exactly. For example, /X/Y matches /X, but not /XZ.
The domain attribute defaults to the current file's domain. The path attribute defaults to the value " / ".
To simplify the development of applications that may not know the absolute path to the current file, the path attribute accepts relative URLs. The user agent converts the relative path to an absolute path and then performs prefix matching against the path attribute. For example, if the access-control attributes for a file are
use access domain "wapforum.org" path "/finance";
the following referring URLs would be allowed to call the external functions specified in this file.
http://wapforum.org/finance/money.cgi
https://www.wapforum.org/finance/markets.cgi
http://www.wapforum.org/finance/demos/packages.cgi?x+123&y+456
The following URLs would not be allowed to call the external function.
http://www.test.net/finance
http://www.wapforum.org/internal/foo.wml
By default, access control is disabled.
Meta-pragmas specify a file's property name and content; Meta-pragmas can also specify a file's scheme, which specify a form or structure that may be used to interpret the property value--the values vary depending on the type of meta-data. The attribute values are string literals.
Meta-pragmas do not define any properties, nor do they define how user agents must interpret meta-data. User agents are not required to act on the meta-data.
Meta-pragmas can have the following attributes:
Specifies meta-information used by the origin servers.
use meta name "Created" "18-June-1999";
The user agent should ignore any meta data named with this attribute. Network servers should not emit WMLScript 1.1 content containing name meta-pragmas.
Specifies meta-information that indicates that the property should be interpreted as an HTTP header.
use meta http equiv "Keywords" "Script, Language";
Meta-data named with this attribute should be converted to a wireless session protocol (WSP) or HTTP response header if the file is compiled before it arrives at the user agent.
Specifies meta-information intended to be used by the user agents.
use meta user agent "Type" "Test";
This meta-data must be delivered to the user agent and must not be removed by any network intermediary.