> 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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
