• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Browser Caching funktioniert nicht

burn4ever

Mitglied
Hallo,
ich habe für eine WordPress Seite Mittels Plugin das Browser Caching für Mediafiles, css, js tc. aktiviert.
Einträge in der .htaccess sind auch vorhanden:


<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A432000
ExpiresByType text/x-component A432000
ExpiresByType application/x-javascript A432000
ExpiresByType application/javascript A432000
ExpiresByType text/javascript A432000
ExpiresByType text/x-js A432000
ExpiresByType text/html A432000
ExpiresByType text/richtext A432000
ExpiresByType image/svg+xml A432000
ExpiresByType text/plain A432000
ExpiresByType text/xsd A432000
ExpiresByType text/xsl A432000
ExpiresByType text/xml A432000
ExpiresByType video/asf A432000
ExpiresByType video/avi A432000
ExpiresByType image/bmp A432000
ExpiresByType application/java A432000
ExpiresByType video/divx A432000
ExpiresByType application/msword A432000
ExpiresByType application/vnd.ms-fontobject A432000
ExpiresByType application/x-msdownload A432000
ExpiresByType image/gif A432000
ExpiresByType application/x-gzip A432000
ExpiresByType image/x-icon A432000
ExpiresByType image/jpeg A432000
</IfModule>

Leider scheinen die Regeln aber nicht zu greifen, denn wenn ich z.B. meine css Dateien inspiziere ist da immer noch ein:
Cache-Control:max-age=0

Jemand eine Idee woran das liegen kann?
Muss ich da ectl. noch mein hosting Paket eweitern (1&1 Dual Perfect)
 
Werbung:
Vlt. weil das Apache-Modul mod_expires.c fehlt. Um das zu bekommen müsstest Du dich an deinen Webhoster wenden, ich mach mir da aber wenig Hoffnungen.
 
Okay,
jetzt mal ne dumme Frage ;-)
Wollte gerade via phpinfo mal die loaded modules checken, finde aber in der Info keinerlei Apache Hinweise.
Also habe ich in meinem Hostingpaket kein Apache Server, richtig?
Kann ich dann trotzdem das Browser Caching aktivieren?
 
Werbung:
Ob Du einen Apache-Server nutzt musst Du deinen Hoster fragen. Nur der kann dir dann auch beantworten, ob es eine Caching-Möglichkeit analog dem Apache mod_expire-Modul (was es nur für Apache in der Form gibt) gibt.
 
Hier die Info vom Hoster:
Wir können Ihnen mitteilen, dass das Apache-Modul Expires (mod_expires) standardmäßig aktiv ist.
Hm,
dann weiss ich leider nicht warum das Browser Caching nicht funktioniert.
Muss ich da noch was in der -htaccess eintragen?
 
Vlt. lässt Du erstmal die Bedingung um den Abschnitt weg, also

Code:
<IfModule mod_expires.c>

und

Code:
</IfModule>

Dann wäre noch die Frage woran Du festmachst, dass das Caching nicht funktioniert. Prüfst Du den HTTP-Header?
 
Werbung:
Hmmm,
mein Problem scheint doch wohl mehr Browser bedingt zu sein.
Wenn ich im Safarie und Firefox inspiziere werden die files gecached, im Chrome jedoch nicht.
Muss ich wohl noch mal die Browsersettings durch gehen.
 
Zurück
Oben