How GZipped contents are transfered on the web?
- by PJ
I heard that static contents like CSS and JavaScript can be better delivered in GZip format.
And Content Developer Network (CDN) always does so.
However I don't understand how the format works. First when I tried making a gzipped file via command-line. The file extension is .gz. This is different from .css and .js. How do browsers recognize which file is gzipped or not.
Second, how browsers "decompress" files? I dragged my index.html.gz onto my browsers. But no one worked.
How do such gzipped work in the real world?
What do I need to do if I want to serve CSS/JavaScript using Gzipped format.