forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcachedURLs.lcdoc
More file actions
49 lines (29 loc) · 2.42 KB
/
cachedURLs.lcdoc
File metadata and controls
49 lines (29 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Name: cachedURLs
Type: function
Syntax: the cachedURLs
Syntax: cachedURLs()
Summary: <return|Returns> a list of the <URL|URLs> that have been <download|downloaded> and copied to the <cache> using the <load> <command>.
Synonyms: cachedURL
Introduced: 1.0
OS: mac,windows,linux
Platforms: desktop,server,web
Security: network
Example:
the cachedURLs
Example:
if myURL is not among the lines of the cachedURLs then load myURL
Returns: The <cachedURLs> <function> <return|returns> a list of currently <load|loaded> <URL|URLs>, one per <line>.
Description:
Use the <cachedURLs> <function> to determine which <files> have been <download|downloaded> and are currently in the <cache>. A <cache|cached> <URL(keyword)> can be accessed more quickly than one that is not <cache|cached>.
The <cachedURLs> <function> includes all <URL(glossary)|URLs> that you have successfully <load|loaded> with the <load> <command>. If an unsuccessful attempt has been made to <load> a <URL(keyword)>, it does not appear in the <cachedURLs>. Only <URL(glossary)|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 <URL(glossary)|URLs>:
on unloadAll
repeat for each line thisURL in the cachedURLs
unload URL thisURL
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|custom library> when you create your <standalone application|standalone>. In the Inclusions section of the <Standalone Application Settings> window, make sure "Internet Library" is selected in the list of script libraries.
Changes:
The URLStatus function became part of the Internet library in version 1.1. In previous versions, it was not a library function.
References: URL (keyword), line (keyword), Internet library (library), LiveCode custom library (library), unload (command), load (command), files (function), libURLErrorData (function), URLStatus (function), cachedURLs (function), return (glossary), handler (glossary), download (glossary), cache (glossary), Standalone Application Settings (glossary), URL (glossary), standalone application (glossary), command (glossary), load (glossary), function (control_st)
Tags: networking