Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: ziycon on January 13, 2021, 11:26:33 AM

Title: Caching/Refreshing Issue
Post by: ziycon on January 13, 2021, 11:26:33 AM
I have a fresh install of 2.0.17 no mods and maybe 2 or 3 settings changed from the default install.

When I visit any page I have to do a CTRL + R to load the page correctly, another example is when I click logout nothing happens, I click logout a second time and I get a session error but the user is now logged out.

It's been awhile since I've used SMF so go easy on me  ;D
Title: Re: Caching/Refreshing Issue
Post by: Sir Osis of Liver on January 13, 2021, 11:29:00 AM
Do you have an .htaccess?  What's in it?  Link to forum?
Title: Re: Caching/Refreshing Issue
Post by: Aleksi "Lex" Kilpinen on January 13, 2021, 11:31:08 AM
So what is wrong on the first page load, before you do a hard refresh?
What settings have you for caching in the admin panel?
Who are you hosted with, and do you know if the host has some caching at play as well?

I just recently saw something very similar on GoDaddy, when GoDaddy's firewall and cache was at fault.
Title: Re: Caching/Refreshing Issue
Post by: Sir Osis of Liver on January 13, 2021, 11:43:02 AM
GoDaddy. :P  That must be a new one, none of my GD guys have reported it.  All their servers are different, so it's always a pia to determine what's going on with them.
Title: Re: Caching/Refreshing Issue
Post by: Aleksi "Lex" Kilpinen on January 13, 2021, 11:56:00 AM
Yeah, never was a fan.
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 13, 2021, 12:47:31 PM
Code: [Select]
Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/$ /?ac=$1 [L]

This is all that is in the htaccess file. It's a site running on a local server as the website/forum is still in development.

The caching level is defaulted to level one.

Running on Apache 2.4.46 and PHP 7.3.26.
Title: Re: Caching/Refreshing Issue
Post by: GigaWatt on January 13, 2021, 04:22:26 PM
Disable caching all together, see if that fixes the problem ;).
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 13, 2021, 05:14:47 PM
Disable caching all together, see if that fixes the problem ;).
Tried that already, didn't make any difference.
Title: Re: Caching/Refreshing Issue
Post by: shawnb61 on January 13, 2021, 05:23:00 PM
Is your site using https?   Are all your settings visible in Settings.php & repair_settings.php https or are they still http?

A difference between your settings & https usage can cause flakiness.
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 13, 2021, 05:44:51 PM
Is your site using https?   Are all your settings visible in Settings.php & repair_settings.php https or are they still http?

A difference between your settings & https usage can cause flakiness.

All settings on Settings.php & repair_settings.php are using HTTPS, Ive also confirmed that 'Force cookies to be secure' is enabled.

Still seeing the issue.
Title: Re: Caching/Refreshing Issue
Post by: GigaWatt on January 14, 2021, 05:39:07 AM
This is all that is in the htaccess file. It's a site running on a local server as the website/forum is still in development.

I seriously doubt you've got Varnish running on that, but, just in case, let's disable it. Add this to .htaccess.

Code: [Select]
Header add "disablevcache" "true"
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 14, 2021, 06:36:59 AM
This is all that is in the htaccess file. It's a site running on a local server as the website/forum is still in development.

I seriously doubt you've got Varnish running on that, but, just in case, let's disable it. Add this to .htaccess.

Code: [Select]
Header add "disablevcache" "true"
100% no Varnish running, vanilla Apache and PHP installed with mySQL module.
Title: Re: Caching/Refreshing Issue
Post by: GigaWatt on January 14, 2021, 07:10:07 AM
All settings on Settings.php & repair_settings.php are using HTTPS, Ive also confirmed that 'Force cookies to be secure' is enabled.

What about database driven sessions. Is that enabled or disabled? If it's enabled, disable it, see if it solves the problem... and vice versa :P :D, if it's disabled, enable it ;).

And keep caching completely disabled while we're troubleshooting ;).
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 14, 2021, 07:32:56 AM
Further information, I've tried the two themes that come with a vanilla install and the issues occurs on both.

Now I've found that the issue is only occurring on Firefox, it doesn't occur on Chrome or Edge/Internet Explorer.

Firefox addons:

Title: Re: Caching/Refreshing Issue
Post by: Aleksi "Lex" Kilpinen on January 14, 2021, 07:34:54 AM
That would lead me to believe it could be something in the browser itself, perhaps preloading or some such playing pranks. Browsers have been experimenting with stuff recently quite a bit.
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 14, 2021, 07:41:59 AM
That would lead me to believe it could be something in the browser itself, perhaps preloading or some such playing pranks. Browsers have been experimenting with stuff recently quite a bit.
I can confirm this, looks to be Firefox, since release 79 there are new caching features.

To test this I disabled caching by opening Firefox, going to 'Web Developer' then select the 'Network' tab and on ticking the 'Disable Cache' tickbox.

Forum works fine after disabling the caching in Firefox, need to see if I can find a way to get around this as anyone using Firefox will potentially be affected.
Title: Re: Caching/Refreshing Issue
Post by: Aleksi "Lex" Kilpinen on January 14, 2021, 07:44:55 AM
I disabled caching by opening Firefox, going to 'Web Developer' then select the 'Network' tab and on ticking the 'Disable Cache' tickbox.

Forum works fine after disabling the caching in Firefox
Thanks for this! Sounds like something we should keep in mind as well should this start to be a recurring issue on the boards.
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 14, 2021, 10:31:28 AM
I'd be very surprised if I'm the first or only person experiencing this, no other reports of issues with users using Firefox and SMF?
Title: Re: Caching/Refreshing Issue
Post by: Kindred on January 14, 2021, 10:34:26 AM
I have not encountered this on any of my SMF sites.... but I definitely did see this sort of problem on a wordpress site that I was trying to update the theme for.  Had to do exactly as listed -- go to the network console and tell it to disable caching entirely.
Title: Re: Caching/Refreshing Issue
Post by: Sir Osis of Liver on January 14, 2021, 04:29:46 PM
Haven't seen this behavior on any forums I've been working, on various hosts.  Running FF 81.0.2.  Can we have a link to forum?
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 14, 2021, 05:10:38 PM
Haven't seen this behavior on any forums I've been working, on various hosts.  Running FF 81.0.2.  Can we have a link to forum?

It's not on the web yet, still in development on a local server, I'm running the latest version of Firefox 84.0.2.
Title: Re: Caching/Refreshing Issue
Post by: Sir Osis of Liver on January 14, 2021, 05:24:19 PM
I'm thinking it has something to do with your local setup.  Can you do a test install on host server?
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 14, 2021, 05:44:07 PM
I'm thinking it has something to do with your local setup.  Can you do a test install on host server?

I'm pretty sure it's not the configuration as it's only occurring on Firefox and no other browsers I've tested it on, Chrome, IE/Edge and Safari are all ok.

It'll be another few days until I have a chance to setup the production VM where the site will be hosted.
Title: Re: Caching/Refreshing Issue
Post by: Sir Osis of Liver on January 14, 2021, 06:03:23 PM
If you still have the problem when you get the forum online, would be curious to see if earlier FF version does same.  The nice folks at mozilla are constantly tinkering with it, and gets a bit ragged at times.  I'm still at FF81 because last update trashed the install and reset to scratch, lost all settings and had to recover bookmarks from backup.  Disabled updates and notifications so I'm staying at 81 for a while.
Title: Re: Caching/Refreshing Issue
Post by: ziycon on January 14, 2021, 06:20:44 PM
Will do, thanks.