Laravel: Minify HTML
Assalamualiakum / Hi,
Just a quick blog post this time.
As part of optimisation, it’s important to minify your JavaScript & CSS – this can be done with Laravel Mix.
But how about HTML?
Seen this?
So that’s how it’s look like our generated HTML codes.
And how we going to change into this?
A simple middleware will do to minify our HTML.
Then register the middleware and you are good to go!
Just grab this the Laravel Page Speed, then you’re done!
Thanks,
Nasrul
Nice Share pak Nasrul, baru tahu ada yang seperti ini. Terima kasih.
Sama-sama pak Nafies.
Ini salah satu cara untuk optimise HTML codes.
Selalunya kita minify JavaScript dan CSS, tapi sebenarnya kita juga perlu minify HTML codes.
Nice sifuu.. ty
Thank you, It works.
Laravel 5.8.
Really Nice, works!