Compressing / minifying a site’s code will improve the data transfer from server to the client. The browser will be easily able to get the content from server. There are a lot of benefits that comes with site compression. I use compression too in my own way. My site Open is heavily compressed.
I compressed sites using Python by using loops to iterate over files and replace strings, compress according to my needs. But, every time I had to open a Terminal to give the request and there will be some kind of errors when something new is added to the site.
So, I decided to create a Graphical Compressor. The best thing I thought was, it will be easier to create the application in localhost rather than creating a software. This is because that software creation is not platform independent, but PHP and localhost is.
And I created one. It’s termed as siteCompressor. All you have to do is give the location of the local site and the output path, choose some options and you’re ready to go. With the help of some external libraries like JSqueeze and CssMin, it was easy.
- Compress HTML