# llLoadURL

*LSL function*

```lsl
void llLoadURL(key avatar, string message, string url);
```

- `key avatar`: UUID of the avatar in the same region.
- `string message`: Text message to display in the dialog box.
- `string url`: Web URL to open.

- Delay: 0.1 s
- Energy: 10

Shows dialog to **avatar** offering to load web page at **url** with **message**.

If user clicks yes, launches the page in their web browser, starting the browser if required.

The **url** is truncated to 255 characters and **message** is truncated to 254 characters.

The protocol for the **url** must be specified, currently only "https://" and "http://" are supported.

The URL should be compliant with proper escapes.

```lsl title="How to use" frame="terminal"
llLoadURL(NULL_KEY, "", "");
```

## Caveats

- This function should not be called from group deeded objects[^wiki-b8a8ee], it will silently fail.
- This function silently fails for an avatar that has muted itself.[^wiki-d5f994]

[^wiki-b8a8ee]: This was not always the case, see [History](#history) for details
[^wiki-d5f994]: This can be extremely bewildering to debug because there's no easy way for a user to self-mute. Apparently it "just happens."

## Examples

<details open>
<summary>Example 1</summary>

```lsl collapse={1-12, 18-24}
default
{
    touch_start(integer num_detected)
    {
        key id = llDetectedKey(0);
        string info = "Visit the Second Life website!";

        // must start with either "http://..." or "https://..."
        string url = "http://www.secondlife.com/";

        integer avatarInSameRegion = (llGetAgentSize(id) != ZERO_VECTOR); // TRUE or FALSE

        if (avatarInSameRegion)
        {
            llLoadURL(id, info, url);
        }
        else
        {
            // if the agent is not in the same region, send a message instead
            // the viewer will turn the URL clickable
            llInstantMessage(id, info + " " + url);
        }
    }
}
```

</details>

## Tests

- [llLoadURL Test](https://wiki.secondlife.com/wiki/llLoadURL_Test)

## History

- Introduced in version 1.6, no support for group deeded objects.
- As of version ~1.9, support for group deeded objects was added (possibly by accident).
- In the server upgrade released on 2007-03-14, support for group deeded objects was removed.

---

*Source: [LlLoadURL](https://wiki.secondlife.com/wiki/LlLoadURL) on the Second Life Wiki. Content from the Second Life Wiki articles LlLoadURL (revision 1216154, 2024-01-28), Template:LSL Function/avatar (revision 1179236, 2013-06-15), Template:LSL Function/limits (revision 1168817, 2012-06-11) and Template:LSL Function/chat (revision 1192932, 2014-08-23), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llLoadURL/
