URL | |
Type | keyword |
Dictionary | LCS |
Library | LiveCode Script |
Syntax |
|
Summary | Designates a container consisting of an Internet resource or local file in the form of a URL. |
Introduced | 1.0 |
Changes | As of LiveCode 7.0.0, the URL keyword has been upgraded to understand Unicode files when using URL ("file:"). If the file located at the path has a Byte Order Mark at its beginning, then URL will decode the file according to that Byte Order Mark (UTF-8, UTF-16BE, UTF-16LE, UTF-32BE and UTF-32LE are compatible). If no Byte Order Mark is found, then the file will be decoded as if it were using Native encoding (MacRoman on Mac OS X, ISO-8859-1 on Linux, CP-1252 on Windows). |
OS | mac, windows, linux, ios, android |
Platforms | desktop, server, mobile |
Example |
|
Related | Keyword: binfile, file, ftp, http, resfile, URL Property: HTMLText Command: launch url, libURLSetAuthCallback, libURLSetExpect100, load Function: urlEncode Glossary: binary file, command, container, expression, file, FTP, keyword, LiveCode custom library, local file, platform, resource, resource fork, server, standalone application, text file, Unicode, URL, URL scheme, web server Library: Internet library |
Security | network |
Description | Use the URL keyword to access the contents of a local file or a file accessible on the Web. A URL is a method of designating a file or other resource. You can use a URL like any other container. You can get the contents of a URL or use its contents in any expression. LiveCode supports the following URL schemes:
All actions that refer to a URL container are blocking: that is, the handler pauses until LiveCode is finished accessing the URL. Since fetching a web page may take some time due to network lag, accessing URLs may take long enough to be noticeable to the user. To avoid this delay, use the load command (which is non-blocking) to cache web pages before you need them. For technical information about URLs and URLschemes, see RFC 1630.
*Cross-platform note:* On iOS and Android, you can use the http, ftp and https keywords without the need for the Internet library. When specifying URLs for iOS and Android, you must use the appropriate form that conforms to RFC 1630.
|
Tags | networking,file system |