1

I want to optimize the page loading, using PHP and scripting language. Is there any way to compress the HTML which is being loaded from the template URL, so that based on that scenario I can achieve the goal?

1

2 Answers 2

2

Most webservers will automatically compress HTTP GET requests with something like gzip. Just make sure to turn on server compression for your php server.

2
  • Can you list the server name? Or any other way to compress the HTML content? if any library is available or not,please share with me. we can also compress using .htaccess so such away that we can compress the HTML using angular or not?
    – Gangnam
    Apr 21, 2015 at 11:40
  • If you're running a bare PHP implementation, then I guess you could just follow the steps outlined in other answers and blog posts Apr 21, 2015 at 12:00
1

Compress the HTML on the server, not on the client. E.g. a build step or a step before serving the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.