Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Why does my CSS have issues refreshing?

I'm not sure where the issue stems, however, my CSS isn't refreshing each time I load the page. I've been working with CSS for a while now, and never before encountered this issue. I found a solution: "cmd + shift + R", which refreshed the page with the latest updates I made. However, I still don't understand why it's behaving this way.

Could someone shed light, please?


3 Answers

Cache will most likely be your problem

Hey, quick tip! Use the incognito function to cure these kinds of headaches. (Operating under the premise that you're hitting a cache.)

Most often I find I forgot to link the css but I doubt that was the problem.

Umar Ghouse
Umar Ghouse
14,607 Points

As the others have stated it's most likely that your browser isn't refreshing the page per se. Instead it is drawing from a "cached" version of the page - this is generally done to reduce load times. Since, in production, a web pages' CSS is not likely to change so often, the browser will save the html, css etc. files and when you reload the page, it'll simply use those saved files, instead of calling for new files from the server.

One trick you can use is to reload using "Ctrl + Shift + R" (On Windows) to force the browser to request a new set of files from the server.

Hope that helped!