Hoe afbeeldingen in cache zetten?
Forumregels
LEES: Algemene Voorwaarden. Dit forum is niet voor technische vragen!
LEES: Algemene Voorwaarden. Dit forum is niet voor technische vragen!
Hoe afbeeldingen in cache zetten?
Ik heb website speed test gedaan en hij geeft aan dat een aantal bestanden (jpg) niet in de cache staan. Zoals o.a. site_logo.jpg/gif.
Hoe kan ik dit in de cache zetten? Het zijn toch afbeeldingen die vaak geladen worden bij het benaderen van de website. Kan dit in phpBB en zo ja hoe ? Thx
Hoe kan ik dit in de cache zetten? Het zijn toch afbeeldingen die vaak geladen worden bij het benaderen van de website. Kan dit in phpBB en zo ja hoe ? Thx
- El torro
- Berichten: 4175
- Lid geworden op: 02 sep 2014, 21:28
- Locatie: In het zonnige zuiden
- Contacteer:
Re: Hoe afbeeldingen in cache zetten?
Dat moet in de .htaccess
Hier hoe ik het heb gedaan:
Hier hoe ik het heb gedaan:
Code: Selecteer alles
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 30 days"
</IfModule>
## EXPIRES CACHING ##
Re: Hoe afbeeldingen in cache zetten?
Top! Maar zet hij die jpg etc dan in de cache van de browser van de bezoeker of is het echt de server waar hij in de cache komt ?
Laatst gewijzigd door nl1sms op 06 apr 2018, 18:13, 1 keer totaal gewijzigd.
- El torro
- Berichten: 4175
- Lid geworden op: 02 sep 2014, 21:28
- Locatie: In het zonnige zuiden
- Contacteer:
Re: Hoe afbeeldingen in cache zetten?
In de cache van de browser.
Re: Hoe afbeeldingen in cache zetten?
Ok top..... ik heb het ook in mijn htaccess gezet..... Thx
- Froddelaar
- Berichten: 272
- Lid geworden op: 29 mar 2016, 15:09
- Locatie: Aalst, Belgie
- Contacteer:
Re: Hoe afbeeldingen in cache zetten?
Met onderstaande haal ik een hoge score op https://tools.pingdom.com
En forum vliegt vooruit!
En forum vliegt vooruit!
Code: Selecteer alles
# Enable Compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
</IfModule>
<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>
# Leverage Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
<IfModule mod_headers.c>
<filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf)$">
Header set Cache-Control "max-age=2678400, public"
</filesmatch>
<filesmatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, private, must-revalidate"
</filesmatch>
<filesmatch "\.(pdf)$">
Header set Cache-Control "max-age=86400, public"
</filesmatch>
<filesmatch "\.(js)$">
Header set Cache-Control "max-age=2678400, private"
</filesmatch>
</IfModule>
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Muziek wordt ook toegevoegd in de playlist van textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
Onze Website: https://www.muziekpromo.net
Muziek wordt ook toegevoegd in de playlist van textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
Onze Website: https://www.muziekpromo.net
- El torro
- Berichten: 4175
- Lid geworden op: 02 sep 2014, 21:28
- Locatie: In het zonnige zuiden
- Contacteer:
Re: Hoe afbeeldingen in cache zetten?
¿En dan zet je gzip op het forum en in cPanel uit?
- Froddelaar
- Berichten: 272
- Lid geworden op: 29 mar 2016, 15:09
- Locatie: Aalst, Belgie
- Contacteer:
Re: Hoe afbeeldingen in cache zetten?
gzip in het beheerderspaneel staat uit.
Is ingeschakeld op de server.
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Muziek wordt ook toegevoegd in de playlist van textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
Onze Website: https://www.muziekpromo.net
Muziek wordt ook toegevoegd in de playlist van textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
Onze Website: https://www.muziekpromo.net
Re: Hoe afbeeldingen in cache zetten?
@Froddelaar Kan ik jouw htaccess ook gebruiken zonder dat ik gzip aan heb op de server noch control panel?
- Froddelaar
- Berichten: 272
- Lid geworden op: 29 mar 2016, 15:09
- Locatie: Aalst, Belgie
- Contacteer:
Re: Hoe afbeeldingen in cache zetten?
Volgens mij moet de gzip module toch wel aanstaan op de server.
Anders zal die cache niet werken ..
Beide inschakelen is niet goed, want daarmee kreeg "cache" ik foutmeldingen bij enkele extensies.
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Muziek wordt ook toegevoegd in de playlist van textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
Onze Website: https://www.muziekpromo.net
Muziek wordt ook toegevoegd in de playlist van textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
Onze Website: https://www.muziekpromo.net
Re: Hoe afbeeldingen in cache zetten?
Dit er uit halen dus ?
Code: Selecteer alles
# Enable Compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
</IfModule>
- Froddelaar
- Berichten: 272
- Lid geworden op: 29 mar 2016, 15:09
- Locatie: Aalst, Belgie
- Contacteer:
Re: Hoe afbeeldingen in cache zetten?
Goh geen idee, ik heb het er allemaal instaan.nl1sms schreef: ↑07 apr 2018, 13:10Dit er uit halen dus ?
Code: Selecteer alles
# Enable Compression <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain </IfModule>
gzip ingeschakeld op de server & uitgeschakeld in beheerderspaneel van het forum.
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Muziek wordt ook toegevoegd in de playlist van textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
Onze Website: https://www.muziekpromo.net
Muziek wordt ook toegevoegd in de playlist van textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
Onze Website: https://www.muziekpromo.net