Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Sir Osis of Liver on January 10, 2021, 09:54:03 PM

Title: Problem with background image refresh
Post by: Sir Osis of Liver on January 10, 2021, 09:54:03 PM
Background image on this forum (https://ebook-mecca.com/) refreshes every page load, so every page opens with white bg.  Wasn't happening previously.  Forum owner changed bg image, that apparently triggered the problem.  Previous image has been restored, css is unchanged -



body {
background: url(https://www.ebook-mecca.com/Themes/mobile-desktop/images/sunset.jpg) repeat-y fixed 100%;
font:78%/130% Comic Sans MS;
}



Caching is disabled, no change if set to level 1 or 2.  I have caching disabled on my forums and bg image loads once on initial load, no white bg on additional page loads.  Any idea what's causing this?

Title: Re: Problem with background image refresh
Post by: GigaWatt on January 11, 2021, 09:06:05 AM
Quote from: Sir Osis of Liver on January 10, 2021, 09:54:03 PM
I have caching disabled on my forums...

IMO, good choice ;). I almost always advise to disable caching as well ;). Depends on the forum, but in most cases, for small to medium sized forums, yes ;).

That's the previous image that's loading now or the new one, the one that the forum owner changed?
Title: Re: Problem with background image refresh
Post by: Sir Osis of Liver on January 11, 2021, 11:36:59 AM
She's back to original image, does it with both.  Never seen this before, and she's on my host, so it's not likely server caching issue.  I have an older index.css backup, soon as I get a minute will upload it, see if it's a css problem.

Nope, it's not index.css. >:(

Seeing attached in image info, no idea how it got there.
Title: Re: Problem with background image refresh
Post by: Kindred on January 11, 2021, 12:23:55 PM
that looks to be a chrome skin -- not anything on the website itself
Title: Re: Problem with background image refresh
Post by: Aleksi "Lex" Kilpinen on January 11, 2021, 12:30:19 PM
Quote from: Kindred on January 11, 2021, 12:23:55 PM
that looks to be a chrome skin -- not anything on the website itself
Except it's shown in a FF media window.... :o
Title: Re: Problem with background image refresh
Post by: Kindred on January 11, 2021, 12:36:14 PM
Quote from: Aleksi "Lex" Kilpinen on January 11, 2021, 12:30:19 PM
Quote from: Kindred on January 11, 2021, 12:23:55 PM
that looks to be a chrome skin -- not anything on the website itself
Except it's shown in a FF media window.... :o

"Chrome" in this case refers to the non-website portions of the interface I believe....
Title: Re: Problem with background image refresh
Post by: Aleksi "Lex" Kilpinen on January 11, 2021, 12:41:16 PM
Well, what ever it is - My FF isn't showing that. I'm still a bit confused though, as FF isn't based on chromium. I'm not sure how that would be seen within Firefox.
Title: Re: Problem with background image refresh
Post by: Kindred on January 11, 2021, 04:29:38 PM
it's not chromium....   for maximum confusion -- seriously, the "glittery bits" of the browser program are called "the chrome"
Title: Re: Problem with background image refresh
Post by: Aleksi "Lex" Kilpinen on January 11, 2021, 04:31:54 PM
Okay... Yes - That is confusing, since the chrome:// path is also used in actual Chrome. Thanks for bearing with me as I tried to let that sink in my head.
Title: Re: Problem with background image refresh
Post by: Sir Osis of Liver on January 11, 2021, 08:17:20 PM
chrome://global/skin/media/imagedoc-darknoise.png is black screen, the white screen on page load is apparently caused by reloading the png every time from external link.  Forum owner has no idea how it got there or why it's being called.  It's not in index.css or index.template.php.  I see it in FF, and the white bg in IE.  Doesn't show up in inspect element on either. 
Title: Re: Problem with background image refresh
Post by: GigaWatt on January 27, 2021, 07:27:40 AM
Quote from: Aleksi "Lex" Kilpinen on January 11, 2021, 04:31:54 PM
Okay... Yes - That is confusing, since the chrome:// path is also used in actual Chrome. Thanks for bearing with me as I tried to let that sink in my head.

Which is why Google named the browser Chrome ::)... for maximum confusion ::).
Title: Re: Problem with background image refresh
Post by: Sir Osis of Liver on January 27, 2021, 11:18:09 AM
Turns out the problem was being caused by code in .htaccess that was forcing refresh every page load.  I've used it on multiple forums for years to override caching when working with code and images.  Some browsers would hold on to images for days, and refuse to update css changes.  The code has always worked without issues anywhere I've used it, and had been working on this forum until she recently changed bg image (which she'd done many times before).  No idea why it acted up.




# NEVER CACHE
<FilesMatch "\.(txt|htm|html|php|css)$">
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
</FilesMatch>