# JavaScript Rendering

By default, the Web Unblocker attempts to load websites using a simple HTTP request. It checks the HTTP response code, and if the response is successful (e.g., status code `200`), the body is returned to the client.

However, some websites return a `200 OK` status while still serving a placeholder or error message indicating that **JavaScript is disabled**. In such cases, no actual page content is rendered or visible.

To handle this, the web unblocker offers **on-demand JavaScript rendering** using a special `render` flag. This instructs the unblocker to fully render the page in a headless browser before returning the response, allowing access to JavaScript-dependent content.

#### **How to Use the `render` Flag**

You can enable rendering by appending `_render-1` to the password in your proxy credentials. For example:

```
curl -x http://username:password_render-1@unblocker.iproyal.com:12323 https://example.com -k -v
```

**Use Cases**

* Accessing sites that require JavaScript to display content
* Bypassing anti-bot pages that rely on JavaScript
* Scraping modern web apps with dynamic front-ends

**Notes**

* Rendering may increase response times due to the overhead of launching a headless browser.
* Use rendering only when needed, as most sites can still be accessed with basic HTTP requests.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iproyal.com/tools/web-unblocker/javascript-rendering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
