> For the complete documentation index, see [llms.txt](https://docs.zipy.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zipy.ai/faqs/api-performance-diagnostic-help/compression-not-enabled.md).

# Compression Not Enabled

## Why am I seeing this diagnostic?

When your webapp makes API calls, it receives responses from the API servers. These responses can contain various types of data, such as JSON, XML, or binary files. API response compression refers to the process of reducing the size of the response data before transmitting it over the network by applying compression algorithms such as GZIP or Brotli. The compressed response is then decompressed by the client to obtain the original data.

Not compressing large API responses can have several implications for you as a webapp developer:

1. Increased Network Bandwidth Usage: Large API responses without compression consume more network bandwidth when transmitted from the API server to your webapp.
2. Slower Response Times: Transmitting larger amounts of data without compression takes longer, resulting in slower response times. This delay can impact the user experience, as your webapp may take more time to process and render the received data.
3. Higher Network Latency: Large API responses can increase network latency, especially for users with slower internet connections or when accessing your webapp from remote locations.
4. Mobile Data Usage: Uncompressed API responses can consume a significant amount of users' mobile data plans. This can lead to increased costs for your users or affect their data usage experience, especially for mobile applications.

## How do I fix this?

To mitigate the impact of not compressing medium and large API responses, consider the following:

1. Enable Compression: Implement compression algorithms like GZIP or Brotli on the server side to compress API responses before transmitting them to your webapp. This reduces response sizes, improves network efficiency, and minimizes bandwidth usage.
2. Support Compression on the Client: Ensure that your webapp is capable of decompressing and handling compressed responses. Most modern web browsers and HTTP client libraries have built-in support for decompressing responses.
3. Content-Encoding Headers: Set appropriate Content-Encoding headers in the API responses to indicate that compression has been applied. This allows the client to identify and decompress the response correctly.
4. Test and Optimize: Monitor the performance of your API calls, including response sizes and transmission times. Identify API endpoints that return medium or large responses and optimize them for better efficiency and user experience.


---

# 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.zipy.ai/faqs/api-performance-diagnostic-help/compression-not-enabled.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.
