cachedURLs

returns a list of the URLs that have been download and copied to the cache using the load command.

# Metadata

Platforms: desktop, server OS: mac, windows, linux, web Introduced: 1.0 Security: network

# Syntax

the cachedURLs

# Examples

the cachedURLs

if myURL is not among the lines of the cachedURLs then load myURL

# Description

Use the cachedURLs function to determine which files have been download and are currently in the cache. A cache URL can be accessed more quickly than one that is not cache.

The cachedURLs function includes all URLs that you have successfully load with the load command. If an unsuccessful attempt has been made to load a URL, it does not appear in the cachedURLs. Only URLs whose URLStatus is "cached" appear in the cachedURLs.

Cached files consume memory. To release this memory after you are finished with a URL, use the unload command to remove it from the cache. You can use this handler to unload all URLs:

on unloadAll repeat for each line tThisURL in the cachedURLs unload URL tThisURL end repeat end unloadAll

>*Important:* The cachedURLs function is part of the > Internet library. To ensure that the function works in a > standalone application, you must include this > LiveCode custom library when you create your > standalone application. In the Inclusions pane of the > Standalone Application Settings window, make sure the "Internet" > script library is selected.

# Tags

# See

- **keyword:** URL, line - **glossary:** LiveCode custom library, return, handler, download, cache, Standalone Application Settings, URL, standalone application, command, load - **command:** unload, load - **function:** files, libURLErrorData, URLStatus, cachedURLs - **library:** Internet library - **control structure:** function