BuddyBoss Home – Web › Support Forums › Solutions › Social Learner › Leverage Browser Cache
Tagged: caching
- This topic has 3 replies, 2 contibutors, and was last updated 9 years, 1 months ago by Michael.
Question
October 11, 2015 at 7:01 am #48451@mln83Can anyone suggest optimal settings for leverage of browser cache in .htaccess?
I discovered a problem when logging out of the social learner site (see attached png).
In situation (2) I log out of the site and click on ‘Groups’ tab. Then it looked like (3). After disabling SuperCacher (SiteGround) and CloudFlare CDN the problem still persisted. So I investigated the .htaccess file which looked like this:
## 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 application/pdf "access 1 month" ExpiresByType application/x-javascript "access 1 month" ExpiresByType application/javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month” </IfModule> ## LEVERAGE BROWSER CACHING ##
After setting ‘ExpiresActive’ to off. The problem was solved and the site correctly rendered situation (1) after logging out and clicking on the ‘Groups’ menu item.
The question is – can I enable leverage browser caching – and in that case what should I disable to make sure the Social Learner site works correctly?
I have also been reading through:
But I am still a bit unsure as to how much I can safely enable in the SiteGround SuperCacher (https://www.siteground.com/tutorials/supercacher/) and CloudFlare CDN. Notice: I am not using W3 Total Cache.
Any advice is much appreciated – Thanks 🙂
Answers
October 11, 2015 at 9:04 am #48458@mln83I did some further testing and the issue is still there when click on the ‘HOMEPAGE’ tab. I notice that it’s the same issue on the demo site (http://demo.buddyboss.com/social-learner-sensei/).
A suggested solution to the problem could be to include the following code in the respective wordpress theme Index file:
header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate");
source: http://stackoverflow.com/questions/17360003/force-refresh-on-login-logout-in-wordpress
I will do some further testing but I hope you can use this feedback to improve the theme further 🙂
October 12, 2015 at 8:13 am #48520@
AnonymousHi @mln83, SuperCacher only work with the SiteGround environment so it would be much better you could consult to SiteGround as they support it.
Regards
PallaviOctober 12, 2015 at 8:36 am #48521@mln83Hi @pallavi,
Thanks for replying. I already contacted SiteGround but they were not able to help me.
However as mentioned in my reply I noticed a similar problem on the Social Learner Demo site, where the titlebar is sometimes first updated after about a minute after logging out / logging in on your demo site. Thus I suspect it is a caching issue which could possibly be solved using the above code to force the Internet Browser to refresh cache after login / logout of the Social Learner site.
Regards,
Michael
- The question ‘Leverage Browser Cache’ is closed to new replies.