I am currently using a Mac computer and I cannot figure out how to refresh my website when I make changes to my WordPress stylesheet file. I have tried Cmd+R for hard reloading, I have tried emptying the caches, but nothing seems to work –
the old version is still loaded nonetheless.
I have used a windows computer before and every time I made a style change with my style.css sheet, I would just press ctrl + F5 and it would hard refresh right away.
Does anyone know any tricks other than Cmd+R or clearing the caches to automatically refresh the stylesheet?
3 Answers
“Quick” fix: Right Click -> view page source ( ctrl+U ), find .css file you changed, open it in new tab and reload ( you should see change in place you’ve made it )
ONLY in development mode add php function time() in place of version number
wp_enqueue_style( $handle, $src, array(), time() , 'all' );
Delete cache if you use caching plugin.