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.

Python Flask Basics Templates and Static Files Static Files

css file is not reloading automatically

Every time i make a change in Css file the browser do not refresh the changes in css i have to manually refresh the stylesheet and then it renders the css on screen.

1 Answer

Brendon Butler
Brendon Butler
4,242 Points

There are a few solutions to this.

Bypass Cache Refresh - hard browser refresh, refreshes every bit of your website.

GET Attribute Method - basically all you do is add ?version=1 to the end of your css link in your HTML file. Every time you change your css file, increment the number by 1.

You can also add a "style" element to html and just add your CSS there. At least for testing purposes.