Bug Summary
I’ve been using local for over a year now and it’s a wonderful product, however since the last week every time I make any change to a CSS file it doesn’t reflect in the website I’m building. I have to refresh / hard refresh 5 times or more for it to work. This is beyond frustrating.
I enqueue my stylesheets with filemtime PHP function so it always uses the latest version of my css.
Steps to reproduce
Create a new local instance, create a theme, add the basic files (index.php, functions.php, and style.css). Enqueue your stylesheet and use wp_head and wp_footer respectively.
This is my enqueue function:
function gdc_enqueue_styles() {
$stylesheet_uri = get_template_directory_uri() . '/style.css';
$version = filemtime(get_template_directory() . '/style.css');
wp_enqueue_style('gdc-main-stylesheet', $stylesheet_uri, array(), $version);
}
add_action('wp_enqueue_scripts', 'gdc_enqueue_styles');
This is what has worked for me for the past year and all of a sudden it just doesn’t work any more.
Environment Info
I’m using Windows 10
I use the default environment
My localWP version is: Version 9.0.3+6684