> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/best-practices/streaming-option.md).

# Streaming XOD documents

Stream XOD documents efficiently with streaming option in WebViewer. Learn how to optimize load times by downloading only necessary parts for display. Perfect for pre-converted XOD files using web ser

{% hint style="info" %}
The **streaming option** is only applicable when loading XOD files. If you're loading PDF or Office files directly then please go to [Streaming PDF/Office documents ](/web/best-practices/usedownloader-option.md).
{% endhint %}

By default WebViewer loads XOD documents by only downloading the parts of the file that are required to display the currently visible pages. This approach decreases load times and memory usage because the entire file doesn't have to be downloaded up front.

As long you pre-convert XOD files and host them on a server that supports byte range request headers, which most do, then you get this optimization by default.

The exact checklist is the following:

1. Pre-Convert files to XOD (instead of converting during viewing).
2. Host XOD files on server that supports byte range request headers.
3. Don't set the streaming mode in your WebViewer constructor (default is false, which is what you normally want).

## So what is "streaming: true" good for?

The streaming option should be set to true only if the **conversion** of the XOD file is being streamed/done on the fly. WebViewer will be able to load the file in chunks as the conversion is streamed, however it will have to take in the entire file at the beginning.

For medium to large files (more noticeable on mobile devices) this can cause the viewer to appear sluggish when loading the document because it is processing and storing everything in memory at the same time!

Setting the streaming option to true may be useful if there are small, dynamically generated files uploaded to or created on your server. Since the files are small the download time and memory usage won't be very large.

This also means that you won't have to store many documents on your server that are only viewed once. The PDFNet SDK download includes a WebViewerStreaming sample that can help you get started with this.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.apryse.com/web/best-practices/streaming-option.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
