|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
gordonisnz Smarty Regular
Joined: 05 Sep 2009 Posts: 70
|
Posted: Thu Dec 31, 2020 12:18 am Post subject: Can Smarty be used with Gzip? |
|
|
https://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/
Hi, Ive done a website speed test & it recommends gzipping my site for faster downloads. i found the above site about it.
Does Gzip work well with Smarty ? apart from the actual templates, only a few of my pages are static / un-changing. Most of them extract information from a database & display the information.
If i do use Gzip, is the htaccess example the only thing i need to add ? and everything else will be automatic ?
Im on a shared host - I can alter my php.ini though - but it affects ALL subdomains. I cant alter php.ini just for the subdomain im working on.
EDIT:- smarty-3.1.34 |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Thu Dec 31, 2020 2:43 am Post subject: |
|
|
When Smarty is done with what it does, the completed page is given back to PHP, and it is PHP's job (or the web server if equipped to do so and that is where you want it done) to do the compression. See:
https://www.php.net/manual/en/zlib.configuration.php
The compression settings can be set anywhere, including in your PHP script.
Smarty is out of the picture with respect to compressing the HTML to be sent. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|