> 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/get-started/faq/wasm-threads.md).

# Configure WebAssembly Threads in WebViewer

World's #1 PDF SDK Library for Web, Mobile, Server, Desktop

For optimal performance, the Apryse SDK API uses two different technologies to run its processes, WebAssembly Threads and Emscripten.

* WebAssembly Threads can utilize multiple threads simultaneously to provide better performance but is only supported on Google Chrome for Desktop and the latest versions of Edge and Firefox.
* Emscripten (which compiles both non-threaded WebAssembly and asm.js implementations) is compatible with most browsers but has slower runtime performance.

WebAssembly Threads will be enabled by default if the server is configured correctly and the browser supports this feature. All other cases will default to our single-threaded WebAssembly/asm.js solution.

## Configuring your website

Configured correctly refers to the requirement that some browsers require websites to be "cross-origin isolated" with COOP and COEP to enable the SharedArrayBuffer, which is needed by WebAssembly Threads. To set up your website, please refer to <https://web.dev/coop-coep/> for more details.

If it's not configured you may see a warning like this in Chrome "\[Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See <https://developer.chrome.com/blog/enabling-shared-array-buffer/> for more details."

If applying the configuration to the whole website is not favorable, you can make individual pages "cross-origin isolated". The key parts from <https://web.dev/coop-coep/> are:

* From the page that contains WebViewer set the header `Cross-Origin-Opener-Policy: same-origin`
* From the page that contains WebViewer and the WebViewer lib folder set the header `Cross-Origin-Embedder-Policy: require-corp`


---

# 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/get-started/faq/wasm-threads.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.
