<p>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?</p>

<p>This is what I imagine it will be like:</p>

<ol>
<li>gzip foo.js</li>
<li>change link in html to point to foo.js.gz instead of just .js</li>
<li>Add some kind of header to the response?</li>
</ol>

<p>Thanks for any help at all.</p>

<p>-fREW</p>

<p><strong>EDIT</strong>: 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.</p>

Using gzip compression on a webserver usually means compressing the output from it to conserve your bandwidth - not quite what you have in mind.
Look at this description
or
This example