Download the PHP package sankalp_sans/slim-goes-slimmer without Composer

On this page you can find all versions of the php package sankalp_sans/slim-goes-slimmer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package slim-goes-slimmer

slim-goes-slimmer

Released 2015.11.27, Updated 2024.03.18 (strip HTML comments)

HTML pages with embedded JS or complicated division hierarchy are written with indentation for readability and good developer experience. This causes websites' source codes to look like this:

I did a rough benchmarking of this on several popular media websites and found that we waste somewhere from 20 to 30% of the HTML bandwidth to indented HTML and JavaScript. So, I decided to solve this problem, and implement this for Slim framework first, because this the framework I'm currently working with.

So far, slim-goes-slimmer reduces the above piece of HTML to

... thus stripping whitespaces from the beginning of every line

Why I haven't "optimized" it further?

Mainly because I'm facing weird issues with base64-encoded images in HTML

Using

Inspiration

This project is inspired by a project I have contributed to https://github.com/christianklisch/slim-minify earlier. I intended to contribute to it further, but haven't sone so because slim-goes-slimmer is specifically addresses to my set of problems, and I will tweak this as and how I need it on my PHP projects.

Results so far

Encouraging. I have been observing page sizes reduced by ~25% based on a sample of 100 pages, the list of which I will be publishing soon.

Contributing

Contributing is dumb simple. Fork, code, push and raise a pull request. I'll be happy if you could contribute test cases, as I usually am too lousy to code them.


All versions of slim-goes-slimmer with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
slim/slim Version >=2.5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sankalp_sans/slim-goes-slimmer contains the following files

Loading the files please wait ....