No cloudflare or anything like that enabled. My hosting does have litespeed but I don't think that has anything to do with it as it updates fine in Edge just not Chrome.
Hard refresh as in clear cookies/cache? I shouldn't have to do that EVERY TIME I make an update to a theme. Also, probably won't help as I'm trying in incognito mode which does exactly that every time you close and open the window. I have closed and reopened incognito mode 50+ times since last night.
Do I have to keep changing the name every time I do an update to the theme? Cause again, that's a workaround, not a solution.
Oh okay, well if it updates fine in Edge & not Chrome it's probably not Litespeed.
No, you will not need to hard refresh each time. Although a hard refresh just forces Chrome to reload things like cached JS & should usually take care of CSS too, but there have been other people on the web having issues with Chrome not refreshing stylesheets - not just on MyBB.
The other way to update user caches is to use meta tags with Cache-Control:
The HTTP Cache-Control header holds directives (instructions) in both requests and responses that control caching in browsers and shared caches (e.g., Proxies, CDNs).
developer.mozilla.org
You can basically do this:
-> Admin CP
-> Templates & Style
-> Click Templates link on left
-> Click your theme link
-> Click the Index Page Templates link
-> Click the 'index' link
You should see something similar to this:
HTML:
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
Right before {$headerinclude} you can add your cache-control meta tags.
HTML:
<meta http-equiv="cache-control" content="max-age=0" />
This would be pretty aggressive because it basically means "look for a new version of cached files after 0 seconds" so it would never cache.
You can change it to any amount (it's in seconds). So, 3600 = 60 minutes meaning the client will look for new versions of files every 60 minutes. You could do 86,400 seconds so that each client only stores cached files for 24 hours max.
You could add this META tag into your template for MyBB when you're making changes and then once you settle on your CSS for a long period of time just change the max-age or remove the meta tag completely so you can benefit from caching.
It won't take you long and will stay in place even when you update your files
🙂
However, meta tags will fix the issue for real visitors, but still not override caches for proxies & certain services. Basically the meta tags only work because browsers are specifically looking for meta tags. You can use .htaccess / HTTP Headers to have a more stable & full on anti-cache fix. I recommend trying both, but I know the first example I just gave will work & the easier meta tag example will work too
🙂 Even the htaccess isn't hard, but it might depend on your web host because some override these settings with master files.