Jump to content

[Solved] GZip Compression enabled?


Recommended Posts

I thought I read somewhere here (I can't remember where) that the prestashop is gzip enabled. However, I checked a few gzip compression test sites and they all show my store isn't utilizing gzip compression/decompression. I know my server allows it as I have it enabled on other sites. I know it can be simply enabled via .htacess but is it configured somewhere in the php code in prestashop? Thanks

One other question. I noticed the file version and date didn't change on the download section. Has the new version with at least the shopping cart bug been uploaded there or is it somewhere else? Thanks

Link to comment
Share on other sites

Hi Graphic Services!


I thought I read somewhere here (I can’t remember where) that the prestashop is gzip enabled. However, I checked a few gzip compression test sites and they all show my store isn’t utilizing gzip compression/decompression. I know my server allows it as I have it enabled on other sites. I know it can be simply enabled via .htacess but is it configured somewhere in the php code in prestashop? Thanks


I do not understand what you mean.
"PrestaShop" is gzip enabled ?!


PrestaShop ask (but optionaly) the gzip support in order to manage archives such as translations or modules but if you do not need these features having that support disabled, or even do not having it, it is definitly not a problem.


However, I checked a few gzip compression test sites and they all show my store isn’t utilizing gzip compression/decompression.


How websites can know if you have gzip support enabled or not. Without being executed on your website path (it means that you uploaded them before by FTP) it is not possible.


I know it can be simply enabled via .htacess but is it configured somewhere in the php code in prestashop? Thanks


No, nowhere. If you have to enable it by your own (such as PHP 5 on some host provider) it will be by your own.
PrestaShop just check if it is "available" or "enabled" if you prefer.


One other question. I noticed the file version and date didn’t change on the download section. Has the new version with at least the shopping cart bug been uploaded there or is it somewhere else? Thanks


Everything's on the same archive.
See changelog for more details.
Link to comment
Share on other sites

  • 4 weeks later...

I have a problem with my gzip translation arhive because when I browse to import it give me an error: "1 error 1 archive cannot be extracted"..maybe my host provider doesn't have gzip enabled,so how can I manualy install the language file?thank u

Link to comment
Share on other sites

  • 5 years later...

How can I enable compression to themes/default/cache?
this is what i get from PageSpeed Insights and gtmetrix.com:

Compressing the following resources with gzip could reduce their transfer size by 247.8KiB (73% reduction).

My prestashop version is: 1.5.6.2 (Default theme)

 

my current .htaccess code is this:

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule . - [E=REWRITEBASE:/store/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url= [QSA,L]

# Images
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p//jpg [L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p///jpg [L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$1jpg [L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$1jpg [L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$5/$1jpg [L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$5/$6/$1jpg [L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$5/$6/$7/$1jpg [L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$5/$6/$7/$8/$1jpg [L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/jpg [L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/ [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>


<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>


FileETag INode MTime Size
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript
</IfModule>
</IfModule>   

Best regards.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...