开发者

gzip javascript files not with the server

开发者 https://www.devze.com 2023-01-02 14:59 出处:网络
The answer to gzipping javascript files is always some variant of \"let the server do it\", but what if I want to locate javascript files at URIs that are not behind my web server? How can Istore gzip

The answer to gzipping javascript files is always some variant of "let the server do it", but what if I want to locate javascript files at URIs that are not behind my web server? How can I store gzipped files and ensure browsers will correctly render the javascript? Do I need to ad开发者_JAVA百科d some header data at the beginning of the file itself for the major browsers to correctly use the file? And how can I accomplish that, since the file is binary? I tried encoding as base 64, but could not get that to work either. (My experiments were with the js URI behind my IIS 7 server.)


You can't. You need to set the Content-Encoding header.

0

精彩评论

暂无评论...
验证码 换一张
取 消