Gzip enabled aber wird trotzdem nicht komprimmiert

Hallo Leute, ich versuche gerade shopware ein wenig zu beschleunigen. Gzip wird von yslow bemängelt, dass 14 files nicht komprimmiert werden. Habe info.php aufgerufen und gzip ist enabled. Habe auch die .htaccess Datei angeschaut da ist ebenfalls von enabled gzip compression die Rede. Woran kann es liegen?

Ich vermute gzip ist aktiviert, aber deine JS Dateien werden von gzip nicht komprimiert oder ? Oder werden hier garkeine Dateien seitens gzip komprimiert ?

Also laut yslow liste sind in den 14 Dateien beides, CSS & JS Dateien enthalten. Da wird denke wohl/wie es aussieht garnichts komprimiert?

http://www.feedthebot.com/pagespeed/ena … ssion.html

Danke, habe die Codes durchprobiert, yslow spuckt trotzdem das gleiche raus, oder fehlt nich was, muss ich SWCache leeren? Oder etwas anderes zusätzlich vornehmen, irgendwelche Einstellungen in Shopware vornehmen? Laut info.php ist die compression an. Am Server/Provider kanns nicht liegen?

Die gzip Kompression lässt sich vom Apache Webserver pro MIME-Type steuern. Vielleicht sind hier in der Definition nicht alle Typen vertreten. code AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript (…)[/code] Schau mal mit Firebug im http-header nach, bei welchem textbasierten Content-Type nicht Content-Encoding:gzip steht, dann hast Du einen guten Hinweis, was ggf. in der gzip bzw. deflate Konfig fehlt.

Bei mir wird auch nur die eigentliche Seite mit gzip komprimiert, schalte ich aber den HTTP-Cache aus wird jede .css und .js komprimiert.

Ich möchte mich hier auch nochmal einhängen. Mittlerweile dürfte ich viele Kombinationen in der htaccess getestet haben. Immer wieder mit dem selben Ergebnis beim Pagespeed-Test: Komprimierung nicht aktiv. Aktuell sieht der Punkt in meiner htaccess wie folgt aus: [code]
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl) mod_gzip_item_include handler ^cgi-script
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.gzip.
# Enable gzip compression

AddOutputFilterByType DEFLATE text/plain text/html text/xml
AddOutputFilterByType DEFLATE text/css text/javascript
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

[/code] Kann evtl SSL das Problem sein? Achja, die Domain ist: https://www.vitalingo.com/de/ Danke mal soweit für Ratschläge und Tipps

Ist das Apache Modul mod_deflate überhaupt aktiviert ? Ist es ein eigener Server ?

Laut Betreiber ist es standardmäßig aktiviert. Kann ich das irgendwie testen? Es ist kein eigener, sondern ein managed Server.

[quote=„bingoo“]Laut Betreiber ist es standardmäßig aktiviert. Kann ich das irgendwie testen? Es ist kein eigener, sondern ein managed Server.[/quote] Überprüfe mal deine phpinfo ( Shopware Backend -> Einstellungen - Systeminfo -> PHP Info ) und suche mal hier nach „deflate“ und schaue ob es drin steht.

Hallo kayyy, deflate kommt bei folgenden Einträgen vor: Stream Filter support: zlib.inflate, zlib.deflate _SERVER[“HTTP_ACCEPT_ENCODING”]: gzip, deflate _ENV[“HTTP_ACCEPT_ENCODING”]: gzip, deflate Ist das ok?

Schreib mal in deine .htaccess rein: <ifmodule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifmodule> Wenn das nicht klappt, dann: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript Und poste zur Sicherheit mal deine komplette .htaccess

Die beiden Parts sind ja bereits enthalten. Hier mal meine htaccess [code]
RewriteEngine on

#RewriteBase /shopware/

Https config for the backend

RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://www.vitalingo.com%{REQUEST_URI} [R=301,L]

RewriteRule shopware.dll shopware.php
RewriteRule files/documents/.* engine [NC,L]
RewriteRule backend/media/(.*) media/$1 [NC,L]

RewriteCond %{REQUEST_URI} !(/(engine|files|templates)/)
RewriteCond %{REQUEST_URI} !(/media/(archive|banner|image|music|pdf|unknown|video)/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ shopware.php [PT,L,QSA]

Fix missing authorization-header on fast_cgi installations

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
# Staging-Rules start SetEnvIf Host “staging.vitalingo.com” ENV=staging DirectoryIndex index.html DirectoryIndex index.php DirectoryIndex shopware.php # Disables download of configuration
Deny from all
# Enable gzip compression
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl) mod_gzip_item_include handler ^cgi-script
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.gzip.
# Enable gzip compression

AddOutputFilterByType DEFLATE text/plain text/html text/xml
AddOutputFilterByType DEFLATE text/css text/javascript
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript



ExpiresActive on
ExpiresDefault “access plus 1 month”
FileETag None

Header append Cache-Control “public”
Header unset ETag


# Disables auto directory index
Options -Indexes

Options -MultiViews

php_value memory_limit 128M

php_value max_execution_time 120

php_value upload_max_filesize 20M

php_flag phar.readonly off
php_flag magic_quotes_gpc off
php_flag session.auto_start off
php_flag suhosin.session.cryptua off
php_flag zend.ze1_compatibility_mode off
# AddType x-mapp-php5 .php # AddHandler x-mapp-php5 .php[/code]

Versuche mal nur eins, also entweder … oder AddOutputFilterByType …

Wenn ich nur nehme, bricht der Pagespeed noch weiter ein. Nehme ich nur AddOutputFilterByType (auch ohne ) ist es wieder wie vorher. also kein Speed-Einbruch, aber noch immer die Anzeige der fehlenden Komprimierung.

Es scheint also schon etwas zu bewirken, nur nicht im gewünschten Ausmaß.

Wenn Du Apache2 einsetzt, dann kannst Du den -Teil ignorieren, denn mod_gzip aus Apache 1.3 ist in Apache2 durch mod_deflate ersetzt worden (s. http://www.howtoforge.com/apache2_mod_deflate ).

Du kannst auch noch folgende Zeile probieren:

AddOutputFilterByType DEFLATE text/x-js

Ansonten wäre interessant zu wissen, was in Firebug oder den Chrome-Entwickler-Tools als Content-Type bei JacaScript- und CSS-Dateien angezeigt wird.

Die Dateien, die yslow bemängelt, sind aber keine externen Dateien, also von einem anderen Server/Anbieter (Facebook, Google, etc.)?

AddOutputFilterByType DEFLATE text/x-js brachte keine Veränderung. Wie genau checke ich in Firebug denn den Content-Type? Ich weiß leider nur wie ich die meta Angaben im Header auslesen könnte. Die Dateien sind nicht extern. Also klar, die gibt es auch, aber in erster Linie geht es ja darum, dass sich gzip irgendwie nicht aktivieren lässt.

Ich habe nun nochmal mit dem Hoster gesprochen. Dieser meinte es ist definitiv aktiviert. Unsere Magazin, welches über das Verzeichnis /news/ über die selbe Domain erreichbar ist, ist nun auch komprimiert. Dazu musste aber in Wordpress noch folgender Code eingebaut werden: " ob_start(“ob_gzhandler”); ?>" Was und wo muss denn in Shopware implementiert werden, damit dies aktiviert wird? Es scheint ja nun definitiv an der Shopsoftware zu liegen. EDIT: Folgendes haben wir nun noch in die htaccess integriert und es klappt endlich: <ifmodule mod_deflate.c> <filesmatch> php_value output_handler ob_gzhandler SetOutputFilter DEFLATE </filesmatch> </ifmodule>