I have a css file and to test it, I added some code to the bottom that just changed the color of a small section on the site. It took about 15 minutes but eventually it loaded and updated the CSS. Then when I removed it to see how long it will take to come off again, the code still loads and it has been about 30 minutes. I tried clearing my browser cache as well as changing the version of the CSS file. The version (when I inspect the source code on the browser) is updated to v2 like it should be but the file still contains the code from v1. Would it be because of the host caching the file or something? When I ran into this problem before, changing the version of the css file worked but it is not this time. Any help would be much appreciated. Thanks!
Oh as another note I am using the below code to enque the css file and it is in WordPress:
function my_theme_styles() {
// Enqueue our style.css with our own version
wp_enqueue_style('child-theme-style', get_stylesheet_directory_uri() . '/style.css',
array(), '202107v1');
}
I also know there are other things on stackoverflow but they all just say to either clear the browser cache or to change the version at the end of the css file which both options I have already tried with no success.
@Sahriar Saikat mentioned in the comments that it could be cloudflare caching the file and he was right. I checked the settings in cloudflare (which I didn't have access to until today) and found that they were using the query level "ignore query string" which was making it not update. Thanks for your help!