Reputation: 47
I'm building small blog for myself. Using hosting from Siteground and Underscores_ starter theme. I'm having problem with style.css file.
I use Cyberduck for uploads, I'm 100% sure about uploading the file into right folder, I always make sure that I'm overwriting previous one.
Whenever I change something in style.css, I upload it to the themes folder of installed Wordpress, exactly into folder of the theme I'm editing. But when i visit the site afterwards, no visual change occurs (I'm adding @font-face), even when I check the style.css with web inspector there's no change in the file, it still is style.css from previous day.
I don't have such problem with any other files in theme folder, for example editing header.php and adding some random placeholder text into body can be seen instantly after header.php edit and upload.
My style.css works perfectly while running it on localhost with MAMP, thus i don't think that there's problem with actual css code.
Is it normal that it takes Cca. 1 day for style.css to "update" ? By now, I can see visual changes, that I made in the style.css yesterday
Upvotes: 2
Views: 7607
Reputation: 133
sounds like your browser is just saving the css in your cache - clear your internet browser cache and reload the page.
info for different browsers: http://www.refreshyourcache.com/en/home/
(I use chrome and simply hit ctrl and f5 every time I view my pages - there are plugins you can get which force a full refresh automatically on every page load if required.)
Upvotes: 1
Reputation: 6828
To force browsers to serve the latest version of a stylesheet, you can leverage the $version
param of wp_enqueue_style()
. For development purposes, you can version the stylesheet URL with a UNIX timestamp. For _s
that would be (in functions.php):
wp_enqueue_style( '_s-style', get_stylesheet_uri(), array(), time() );
Upvotes: 4
Reputation: 302
You can also test your changes by accessing your website in private navigation mode.
Firefox : https://support.mozilla.org/en-US/kb/private-browsing-browse-web-without-saving-info
Chrome : https://support.google.com/chromebook/answer/95464?hl=en
Upvotes: 1
Reputation: 20905
Try clearing out your cache as your style.css may have been cached and therefore will not be updating instantly.
Windows:
CTRL + F5
Mac:
CMD + SHIFT + R
You can also clear your cache within the browser.
For chrome, go to
Menu -> Settings -> Advanced settings -> Clear browsing data
and tick only the option for clearing your cache for its lifetime.
Upvotes: 2
Reputation: 2035
Seems like your browser is caching your style.css
file. You can force refresh all files with hard reload: hit ctrl
+F5
or ctrl
+shift
+R
on Win or Linux or cmd
+shift
+R
on Mac.
Upvotes: 1