I have an embedded webserver that has a total of 2 Megs of space on it. Normally you gzip files for the clients benefit, but this would save us space on the server. I read that you can just gzip the js file and save it on the server. I tested that on IIS and I didn't have any luck at all. What exactly do I need to do on every step of the process to make this work?
This is what I imagine it will be like:
1. gzip foo.js
1. change link in html to point to foo.js.gz instead of just .js
1. Add some kind of header to the response?
Thanks for any help at all.
**EDIT**: My webserver can't do anything on the fly. It's not Apache or IIS; it's a binary on a ZiLog processor. I know that you can compress streams; I just heard that you can also compress the files once and leave them compressed.
以上就是How do I set up gzip compression on a web server?的详细内容，更多请关注web前端其它相关文章！