#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
How-to and Troubles...
no-cache headers
 
Share:
Share
Tweet
Share
Notifications
Clear all

no-cache headers

    Last Post
RSS

diggerdog
Posts: 3
 diggerdog
Topic starter
March 22, 2020 12:31 pm
(@diggerdog)
New Member
Joined: 2 years ago

I have been talking to site ground about the speed of my site and they noticed that within the headers there was the following added by WpForo:

cache-control: no-store, no-cache, must-revalidate
pragma: no-cache

Which was causing issues to the dynamic caching of the website. Is there a way to prevent these headers so it doesn't interfere with the dynamic cache?

I am using the siteground SG Optimiser plugin for my cache.

Topic Tags
cache siteground
10 Replies
diggerdog
Posts: 3
 diggerdog
Topic starter
March 22, 2020 12:38 pm
(@diggerdog)
New Member
Joined: 2 years ago

Extra info, disabling WpForo take 2 seconds off my site loading time in GTmetrix.

Reply
4 Replies
Martin
 Martin
Moderator
(@martin)
Joined: 6 years ago

Support Team
Posts: 831
Martin - Facebook Martin - Twitter
March 22, 2020 1:11 pm
Reply todiggerdogdiggerdog

@diggerdog,

The header doesn't have any relation to wpForo.

For the speed, please make sure wpForo cache options are enabled in Dashboard > Forums > Settings > Features admin page. Also, try to install Autoptimize plugin and test the speed. Current wpForo versions work fine with this plugin. This is not a cache plugin but does well optimization of forum page loading speed.

And read this support topic to exclude forum from your cache solutions: https://wpforo.com/community/faq/wpforo-and-cache-plugins/#post-37150

 

Powered by gVectors Team. our popular plugins:
wpForo, wpDiscuz

Reply
Anonymous20
 Anonymous20
(@anonymous20)
Joined: 6 years ago

Noble Member
Posts: 1602
March 22, 2020 1:20 pm
Reply toMartinMartin
diggerdog

@martin

Sorry to step in, apparently you are far more into this, still Auto Optimize doesn't work right.

Even here (see my capture as a small example). Several things must be excluded and that is not easy to find (i know what to exclude but most do not).

Fast Velocity optimizer works well with wpForo and Wordpress also, if someone needs to optimize.

 

 2020-03-22-15_17_41-no-cache-headers-–-How-to-and-Troubleshooting-–-wpForo-Support-Forum.png
Reply
Martin
 Martin
Moderator
(@martin)
Joined: 6 years ago

Support Team
Posts: 831
Martin - Facebook Martin - Twitter
March 22, 2020 3:53 pm
Reply toAnonymous20Anonymous20
Martin
diggerdog

@anonymous20,

I don't see any issue on the screenshot. What's wrong exactly?

 

Powered by gVectors Team. our popular plugins:
wpForo, wpDiscuz

Reply
Anonymous20
 Anonymous20
(@anonymous20)
Joined: 6 years ago

Noble Member
Posts: 1602
March 22, 2020 3:56 pm
Reply toMartinMartin
Anonymous20
Martin
diggerdog

@martin

Just press the full screen option of the editor. A visual problem, still there are some here and there.

 

Reply
Anonymous20
Posts: 1602
 Anonymous20
March 22, 2020 12:41 pm
(@anonymous20)
Noble Member
Joined: 6 years ago

Nothing like that is added by wpForo, not in my sites.

As for the extra 2 seconds added, what exactly is the question?

Also no caching works right with wpForo, this has been talked and even pinned here. Exclude wpForo from any caching and/or optimizer. At least until you have a need for them. When that time arrives, there is also plenty of info posted here.

 

Reply
diggerdog
Posts: 3
 diggerdog
Topic starter
March 22, 2020 1:08 pm
(@diggerdog)
New Member
Joined: 2 years ago

I have excluded WpForo from the cache. When I disable WpForo the issue goes away so it is caused by the plug in.

Reply
DaveHamilton
Posts: 21
 DaveHamilton
October 9, 2020 5:46 am
(@davehamilton)
Eminent Member
Joined: 4 years ago

Ok, we've sleuthed and solved this problem, at least for ourselves.

The issue is that when session_start() is called, PHP does whatever session_cache_limiter() is set for it to do. And, by default, it's set to nocache which, as you might now guess, yields:

Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache

In and of itself, this is fine. The problem is that wpForo is calling session_start() for ALL requests, including those that aren't logged in. Why, of course, is something perhaps the admins here might be able to answer.

But we can get around it. I'll add the caveat that what we've done works on our server with our setup. It probably will work for many others, but I can't guarantee that, of course.

We fixed it by editing wp-content/plugins/wpforo/wpf-includes/class-notices.php and adding the (current as of the date of this post) line 16 session_cache_limiter('');. Essentially replacing the three-line function that's there with this four-line one, adding the bolded/red line:

private function init(){
session_cache_limiter('');
if( !wpforo_is_session_started() && ( !is_admin() || (!empty($_GET['page']) && strpos($_GET['page'], 'wpforo-') !== false ) || (wpforo_is_ajax() && !empty($_POST['action']) && false !== strpos($_POST['action'], 'wpforo')) )) session_start();
}

wpForo is still starting its session on non-logged-in users, but now it's not causing the no-cache headers to be sent. The good news is that when a Wordpress user is logged in, that causes Wordpress's no-cache headers to be sent, accomplishing pretty much the same goal.

This seems to affect every single site upon which wpForo runs, including this site and the entire gVectors.com site, too.

I'll be curious to hear what the wpForo authors think about all this.

This post was modified 2 years ago 3 times by DaveHamilton
Reply
2 Replies
Alvina
 Alvina
Moderator
(@alvina)
Joined: 3 years ago

Member
Posts: 1873
Alvina - Facebook Alvina - Twitter
October 9, 2020 9:52 am
Reply toDaveHamiltonDaveHamilton

@davehamilton,

This will be fixed in the next version of the plugin update.

Besides, Please note the wpForo refused session and does not use it. 

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
DaveHamilton
 DaveHamilton
(@davehamilton)
Joined: 4 years ago

Eminent Member
Posts: 21
October 9, 2020 1:56 pm
Reply toAlvinaAlvina
DaveHamilton

@alvina I’m not sure I understand what you’re saying.

has woForo been starting an unnecessary session for years, sitewide, anywhere it’s been installed?

Am I understanding this correctly?

Reply
  All forum topics
  Previous Topic
Next Topic  
Related Topics
  • how to turn off the number of people online or fake people online
    1 week ago
  • Should I use a cache plugin or not?
    2 months ago
  • Forum data missing on front end. Blank forum page.
    2 months ago
  • Disable cache for guests
    4 months ago
  • Being able to see the replies to my private topic.
    5 months ago
Topic Tags:  cache (33), siteground (1),

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages wpforo-advanced-attachments-128x128 wpforo-embeds-128x128 wpForo User Custom Fields addon wpForo – Blog Cross Posting addon wpForo Ads Manager wpForo – WooCommerce Memberships Integration wpForo Emoticons wpForo – Tenor GIFs Integration
View all Addons »

Recent Topics

  • wpforo widgets not showing

    By umais, 2 hours ago

  • Error 2253 Root Cause

    By aaronmckeon, 4 hours ago

  • Forum page

    By Charlespresh, 1 day ago

  • How can I make notification bell appear site wide?

    By marios, 2 days ago

  • wpForo not working correctly with Silk browser on Fire 7 Tablet

    By starman71, 2 days ago

  • Style Guests see "Add Topic" button - even if settings are right

    By DanielOfAnu, 2 days ago

Topic Tags

  • translation49
  • css49
  • plugin conflict48
  • seo45
  • new features43
  • buddypress42
  • ultimate member40
  • avatar40
  • forum40
  • moderation38
  • login38
  • registration36
  • threaded layout35
  • cache33
  • editor32
  • menu32
  • shortcode30
  • spam29
  • phrases28
  • forum accesses28
View all tags (2161)

Recent Posts

  • RE: wpForo 2 Major Update is Imminent!

    Ajax topics is an extremely useful function for US. May...

    By VereK, 7 mins ago

  • RE: How can i remove the Buttons under Name?

    @y-3 ##wpforo #wpforo-wrap .wpfl-1 .wpforo-post .wpf...

    By Tutrix, 39 mins ago

  • RE: Error 2253 Root Cause

    Hi @robert - Thanks. I have reviewed those threads and...

    By aaronmckeon, 55 mins ago

  • wpforo widgets not showing

    Hello I cant see wpforo widget in the WordPress widge...

    By umais, 2 hours ago

  • RE: When is the Update Coming?

    @robert thanks mate 🙂

    By Macky, 8 hours ago

  • RE: Guests see "Add Topic" button - even if settings are right

    Hi @danielofanu, Check this post please:

    By Chris, 13 hours ago

  • RE: wpForo not working correctly with Silk browser on Fire 7 Tablet

    Add the forums menu items to your main menu 😉

    By Tutrix, 17 hours ago

Share:
Share
Tweet
Share
  Forum Statistics
20 Forums
9,747 Topics
49.4 K Posts
8 Online
43.2 K Members

Latest Post: wpForo 2 Major Update is Imminent! Our newest member: Tips On Choosing The Optimum H... Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2022 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation