- This topic has 8 replies, 3 voices, and was last updated 4 years, 1 month ago by
Tom.
-
AuthorPosts
-
February 16, 2019 at 9:38 am #812180
sparkle
i’m trying to implement this browser cache solution and have tried, with no joy, putting the scripts in my child theme and in the gp elements for the header. where is the best place to implement the non-htaccess part of this?
GeneratePress 2.2.2GP Premium 1.7.7February 16, 2019 at 4:30 pm #812397epickenyan
The first solution is for blogspot.com blogs while the second is for WordPress. If you want a custom code inside the .htacess file, try this one.
<IfModule mod_expires.c> AddType application/font-woff2 .woff2 ExpiresActive On ExpiresDefault A0 ExpiresByType video/webm A10368000 ExpiresByType video/ogg A10368000 ExpiresByType video/mp4 A10368000 ExpiresByType image/webp A10368000 ExpiresByType image/gif A10368000 ExpiresByType image/png A10368000 ExpiresByType image/jpg A10368000 ExpiresByType image/jpeg A10368000 ExpiresByType image/ico A10368000 ExpiresByType image/svg+xml A10368000 ExpiresByType text/css A10368000 ExpiresByType text/javascript A10368000 ExpiresByType application/javascript A10368000 ExpiresByType application/x-javascript A10368000 ExpiresByType application/font-woff2 A10368000 </IfModule>
February 16, 2019 at 5:19 pm #812407Tom
Lead DeveloperLead DeveloperLooks good to me, epic – thanks for sharing! ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 19, 2019 at 1:44 pm #814933sparkle
ok. thanks epic!
so with this solution, do i need to add the <include expiration=’7d’ path=’*.css’/> bits to my head? just adding your code to my .htaccess didn’t change the marks from gtmetrix or pingdom for browser cacheing.
February 19, 2019 at 3:46 pm #814983Tom
Lead DeveloperLead DeveloperNo, I don’t believe so. That looks specific to Blogger (not WordPress).
It’s possible that your hosting ignores those variables in your .htaccess, and that you need to get them to add the caching to your server.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 20, 2019 at 5:05 am #815389sparkle
maybe. i’ll ask. thanks.
February 20, 2019 at 9:42 am #815773Tom
Lead DeveloperLead DeveloperNo problem.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 22, 2019 at 8:09 am #817741sparkle
fyi, they did have a very specific cache header for the htaccess. thanks.
February 22, 2019 at 3:45 pm #818207Tom
Lead DeveloperLead DeveloperNo problem ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.