Specifications

CHAPTER 3
36
The navigateToURL() method
The navigateToURL() method opens or replaces a window in the Flash Player’s container application. You
typically use it to launch a new browser window, although you can also embed script in the methods call to
perform other actions.
This usage of the
navigateToURL() method relies on the domain-based security restrictions that the
allowScriptAccess and allowNetworking parameters define. You set the values of the allowScriptAccess
and
allowNetworking parameters in the SWF files wrapper. For more information, see “A b o u t t h e o b j e c t a n d
embed tags” on page 321.
Caching
Flex applications reside entirely on the client. If the browser loads the application, the application SWF file, plus
externally loaded images and other media files, are stored locally on the client in the browser’s cache. These files
reside in the cache until cleared.
Storing a SWF file in the browser’s cache can potentially expose the file to people who would not otherwise be able
to see it. The following table shows some example locations of the browser’s cache files:
These files can remain in the cache even after the browser is closed.
To prevent client browsers from caching the SWF file, try setting the following HTTP headers in the wrapper that
returns the Flex applications SWF file:
Cache-control: no-cache, no-store, must-revalidate, max-age=-1
Pragma: no-cache, no-store
Expires: -1
Trusted sites and directories
The browser security model includes levels of trust applied to specific websites. Flash Player interacts with this
model by assigning a sandbox based on whether the browser declared the site of the SWF files origin trusted.
If Flash Player loads a SWF file from a trusted website, the SWF file is put in the local-trusted sandbox. The SWF
file can read from local data sources and communicate with the Internet.
Broswer or operating system Cache location
Internet Explorer on Windows XP C:\Documents and Settings\username\Local Settings\Temporary Internet Files
Firefox on Windows XP C:\Documents and Settings\username\Application Data\Mozilla\Firefox\Profiles\user-
name.default\Cache
UNIX $HOME/.mozilla/firefox/username.default/Cache/