Jump to content

php trim to save on file size


erme

Recommended Posts

if your html file(s) are large enough to have line space effect the download time then you could just replace all the line breaks with nothing, you could also write the html in one line too i suppose. You could get the file contents using php and replace the line breaks on the fly. You could look into adding gzip compression at the server level too. Or look elsewhere for increased performance of your site.

 

removing the white space seems to be more of an odd solution if your application is having performance issues. What's the full story here, might help to know the why so we can tell ya the how.

 

good luck

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.