开发者

gzip javascript files not with the server

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜