All Products
Search
Document Center

Object Storage Service:0048-00000002

Last Updated:Mar 20, 2026

Problem description

When you use an OSS acceleration endpoint to access an HTML object in a browser, the browser downloads the file instead of displaying it.

Causes

The Content-Disposition response header controls whether a browser displays a file inline or downloads it as an attachment. When set to attachment, the browser treats the response as a file download.

If transfer acceleration was enabled for your bucket after 00:00:00 on December 31, 2020, OSS automatically adds the following headers to responses for objects whose name ends with .htm or .html, or whose content type is text/html:

x-oss-force-download: true
Content-Disposition: attachment

Content-Disposition: attachment is what triggers the download.

Examples

The following example shows a request and response for an object named index.html in a bucket for which transfer acceleration was enabled after December 31, 2020:

GET /index.html HTTP/1.1

HTTP/1.1 200 OK
Content-Disposition: attachment
x-oss-force-download: true

Content-Disposition: attachment causes the browser to download the object instead of displaying it.

Solutions

To serve HTML objects without triggering a download, bind a custom domain name to your bucket and access your objects through that domain. For setup instructions, see Map custom domain names.

References