HtmlMin은 콘텐츠 구조를 깨뜨리지 않고 여분의 공백, 주석 및 기타 불필요한 문자를 제거하여 지정된 HTML5 소스를 최소화하는 빠르고 사용하기 쉬운 PHP 라이브러리입니다.
결과적으로 페이지 크기가 작아지고 더 빨리 로드됩니다.
또한 알파벳순으로 정렬 된 속성과 css-class-name을 다시 정렬하여 더 나은 gzip 결과를 얻을 수 있도록 HTML을 준비합니다.
https://github.com/voku/HtmlMin
use voku\helper\HtmlMin; $html = " <html> \r\n\t <body> <ul style=''> <li style='display: inline;' class='foo'> \xc3\xa0 </li> <li class='foo' style='display: inline;'> \xc3\xa1 </li> </ul> </body> \r\n\t </html> "; $htmlMin = new HtmlMin(); echo $htmlMin->minify($html); // '<html><body><ul><li class=foo style="display: inline;"> à <li class=foo style="display: inline;"> á </ul>'
등록된 댓글이 없습니다.