Advertisement:

Author Topic: Caching/Refreshing Issue  (Read 932 times)

Offline ziycon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,710
  • Gender: Male
Caching/Refreshing Issue
« 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

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,949
  • We were all equal in the end.
Re: Caching/Refreshing Issue
« Reply #1 on: January 13, 2021, 11:29:00 AM »
Do you have an .htaccess?  What's in it?  Link to forum?
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,846
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Caching/Refreshing Issue
« Reply #2 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.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,949
  • We were all equal in the end.
Re: Caching/Refreshing Issue
« Reply #3 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.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,846
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Caching/Refreshing Issue
« Reply #4 on: January 13, 2021, 11:56:00 AM »
Yeah, never was a fan.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline ziycon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,710
  • Gender: Male
Re: Caching/Refreshing Issue
« Reply #5 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.
« Last Edit: January 13, 2021, 01:07:33 PM by ziycon »

Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,341
  • Gender: Male
    • MechDR on GitHub
    • Macedonian electronics forum
Re: Caching/Refreshing Issue
« Reply #6 on: January 13, 2021, 04:22:26 PM »
Disable caching all together, see if that fixes the problem ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline ziycon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,710
  • Gender: Male
Re: Caching/Refreshing Issue
« Reply #7 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.

Online shawnb61

  • Dev. Team Mentor
  • Developer
  • SMF Hero
  • *
  • Posts: 3,118
    • sbulen on GitHub
Re: Caching/Refreshing Issue
« Reply #8 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.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline ziycon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,710
  • Gender: Male
Re: Caching/Refreshing Issue
« Reply #9 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.

Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,341
  • Gender: Male
    • MechDR on GitHub
    • Macedonian electronics forum
Re: Caching/Refreshing Issue
« Reply #10 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"
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline ziycon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,710
  • Gender: Male
Re: Caching/Refreshing Issue
« Reply #11 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.

Offline GigaWatt

  • The Smiley Guy
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,341
  • Gender: Male
    • MechDR on GitHub
    • Macedonian electronics forum
Re: Caching/Refreshing Issue
« Reply #12 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 ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline ziycon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,710
  • Gender: Male
Re: Caching/Refreshing Issue
« Reply #13 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:

  • Cookie Manager - Cookie Editor

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,846
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Caching/Refreshing Issue
« Reply #14 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.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline ziycon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,710
  • Gender: Male
Re: Caching/Refreshing Issue
« Reply #15 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.

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,846
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Caching/Refreshing Issue
« Reply #16 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.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline ziycon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,710
  • Gender: Male
Re: Caching/Refreshing Issue
« Reply #17 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?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,232
  • Gender: Male
    • Kindred-999 on GitHub
Re: Caching/Refreshing Issue
« Reply #18 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.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,949
  • We were all equal in the end.
Re: Caching/Refreshing Issue
« Reply #19 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?
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns