Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Adam Harms
9,826 Pointsflask cache wont clear
When I write a new style sheet command in my flask program and then try to view it in my browser it only shows the previous css settings, when I clear my cache it shows the new current css setting but if I update my css again it will not change until I clear my cache. Does anyone know a fix for this? I tried looking at stackoverflow and the and flask.pocoo.org/snippets but found nothing that actually helped.
Please help, there has to be something that will work, or Im doing it wrong...
1 Answer
Chris Freeman
Treehouse Moderator 68,468 PointsSome browsers have switches to turn off the caching behavior. But this isn't a long term solution.
The other option is to change the HTML link to the CSS file to include a changing bit that would cause the page to get reloaded. In this blog entry, they used something like this:
<link rel="stylesheet" type="text/css" href="style.css?version=3.2" />
Adam Harms
9,826 PointsAdam Harms
9,826 PointsI found if I go into the incognito window it will work just fine. What is going on???