Kaj Dijkstra
Kaj Dijkstra

Reputation: 327

native gzip decompression in chrome in javascript

Is it possible in chrome to decompress a file and read the content in js in a native way, Not via javascript itself. I need to decompress a big file in the browser and doing this in javascript is really buggy and slow. I know it is possible to deliver gzipped html and css files to the browsers. is it possible to do the same with files that are loaded into javascript via ajax?

Upvotes: 0

Views: 1480

Answers (1)

Bergi
Bergi

Reputation: 664206

is it possible to do the same with files that are loaded into javascript via ajax?

Yes, ajax requests are treated like every other HTTP requests and the responses will be decompressed automatically. You just have to send the same appropriate Content-Encoding headers.

Upvotes: 2

Related Questions