Xangelix
Xangelix
Explore posts from servers
CDCloudflare Developers
Created by Xangelix on 9/19/2024 in #pages-help
Can I pre-compress a file to provide a Content-Length header?
As taken from https://community.cloudflare.com/t/no-content-length-header-when-content-type-gzip/492964/2 it appears Content-Length is generally unavailable for cloudflare pages objects as they are transparently compressed and delievered without knowing the final size of the content. I have a rather large WASM file that I'm wanting to display a loading bar for as it is downloaded to a browser from cloudflare pages. While I could likely (?) solve this by disabling compression for the file, the savings from compressing it are quite significant. Is it possible that I could precompress the file with brotli and provide the headers like so? _headers
myfile.wasm.br
Content-Type: application/wasm
Content-Encoding: br
Content-Length: <size_of_brotli_file>
myfile.wasm.br
Content-Type: application/wasm
Content-Encoding: br
Content-Length: <size_of_brotli_file>
If I do this-- will I get a Content-Length response for that file from Cloudflare Pages? Thanks!
2 replies
CDCloudflare Developers
Created by Xangelix on 9/19/2024 in #general-help
CF Pages: Can I pre-compress a file to provide a Content-Length header?
As taken from https://community.cloudflare.com/t/no-content-length-header-when-content-type-gzip/492964/2 it appears Content-Length is generally unavailable for cloudflare pages objects as they are transparently compressed and delievered without knowing the final size of the content. I have a rather large WASM file that I'm wanting to display a loading bar for as it is downloaded to a browser from cloudflare pages. While I could likely (?) solve this by disabling compression for the file, the savings from compressing it are quite significant. Is it possible that I could precompress the file with brotli and provide the headers like so? _headers
myfile.wasm.br
Content-Type: application/wasm
Content-Encoding: br
Content-Length: <size_of_brotli_file>
myfile.wasm.br
Content-Type: application/wasm
Content-Encoding: br
Content-Length: <size_of_brotli_file>
If I do this-- will I get a Content-Length response for that file from Cloudflare Pages? Thanks!
2 replies
RRunPod
Created by Xangelix on 4/11/2024 in #⚡|serverless
Questions on large LLM hosting
No description
8 replies