This topic has 6 replies, 2 voices, and was last updated 9 years by rogeriovaz.
-
Author
-
October 2, 2015 at 07:05 #80368rogeriovazParticipant
I test my website in gtmetrix and he is showing that some files of kleo are not able to set expirate headres even when I configure the .htaccess file to do it.
Would someone give me an ideia how to solve it?
You can look the results here: https://gtmetrix.com/reports/www.elorural.com.br/I8X4EXDh
Thanks!Attachments:
You must be logged in to view attached files.October 2, 2015 at 16:58 #80432RaduModeratorHi,
Remove query string from static resources by adding this snippet to kleo-child/functions.php
COPY CODEfunction pu_remove_script_version( $src ){ return remove_query_arg( 'ver', $src ); } add_filter( 'script_loader_src', 'pu_remove_script_version' ); add_filter( 'style_loader_src', 'pu_remove_script_version' );
Then empty cache and check again.
Read more here : https://archived.seventhqueen.com/forums/topic/how-do-i-sovle-this-query-issues-due-to-the-stings-with
Regards
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 2, 2015 at 18:31 #80459RaduModeratorHi,
I’ve tested on gtmetrix and i see that the cache for these resources is 30 minutes and the GtMetrix says :
The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:
COPY CODEhttps://c6c25da9f03548367724b8af95c7bae87f35eec7.googledrive.com/host/0B5JmcUWWXmQBflJZSFJvMTVwOXpvM0x2MzQ5TXpwZy1zcHFJdUk0RVc4c0JnUlJMSFZuV1U/fundo_full.jpg (20 seconds) http://connect.facebook.net/en_US/sdk.js (20 minutes) http://www.elorural.com.br/wp-content/plugins/buddypress/bp-core/deprecated/js/jquery-scroll-to.min.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/buddypress/bp-core/js/confirm.min.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/buddypress/bp-core/js/jquery-cookie.min.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/buddypress/bp-core/js/jquery-query.min.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/buddypress/bp-core/js/widget-members.min.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/buddypress/bp-groups/js/widget-groups.min.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/js_composer/assets/css/js_composer.css (30 minutes) http://www.elorural.com.br/wp-content/plugins/js_composer/assets/js/js_composer_front.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/js_composer/assets/lib/isotope/dist/isotope.pkgd.min.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/js_composer/assets/lib/waypoints/waypoints.min.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/revslider/rs-plugin/css/settings.css (30 minutes) http://www.elorural.com.br/wp-content/plugins/revslider/rs-plugin/js/jquery.themepunch.revolution.min.js (30 minutes) http://www.elorural.com.br/wp-content/plugins/revslider/rs-plugin/js/jquery.themepunch.tools.min.js (30 minutes) http://www.elorural.com.br/wp-content/themes/kleo-child/buddypress/css/buddypress.css (30 minutes) http://www.elorural.com.br/wp-content/themes/kleo-child/buddypress/js/buddypress.js (30 minutes) http://www.elorural.com.br/wp-content/themes/kleo-child/style.css (30 minutes) http://www.elorural.com.br/wp-content/themes/kleo/assets/css/app.min.css (30 minutes) http://www.elorural.com.br/wp-content/themes/kleo/assets/css/bootstrap.min.css (30 minutes)
Try to set this
COPY CODE# CSS and JavaScript ExpiresByType text/css “access plus 1 year” ExpiresByType application/javascript “access plus 1 year” ExpiresByType application/x-javascript “access plus 1 year”
to
COPY CODE# CSS and JavaScript ExpiresByType text/css "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month"
Let me know if will solve the issue.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 2, 2015 at 19:52 #80472RaduModeratorAdd this at top of your htaccess
COPY CODE<IfModule mod_expires.c> # Enable expirations ExpiresActive On # Default directive ExpiresDefault "access plus 1 month" </IfModule>
Let me know if it works
Regards
RAdu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 2, 2015 at 20:55 #80476rogeriovazParticipantAs you can read in my previous message sent on OCTOBER 2, 2015 AT 17:41 in this topic this configuration was already active.
# Expires headers (for better cache control)
<IfModule mod_expires.c>
ExpiresActive on# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault “access plus 1 month” -
AuthorPosts
The topic ‘Expires headers’ is closed to new replies.