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

JavaScript Object-Oriented JavaScript (2015) Constructor Functions and Prototypes Making the UI Work

Shaun Glassman
Shaun Glassman
6,496 Points

I constantly have to clear my browser cache for changes to the code to show in preview. Is there a way around this?

I constantly have to clear my browser cache for changes to the code to show up in preview. Is there a way around this?

4 Answers

When I'm developing I just disable the cache. Each browser is different, but there are instructions for every browser on the web. In Chrome you can do it in Developer Tools > Network tab > Disable Cache.

Maria Nygren
Maria Nygren
10,021 Points

In Chrome you can also use Incognito Mode (you can access this by pressing ctrl + shift + n on windows or ⌘-Shift-N on a mac) . Chrome's incognito mode uses a fresh cache and cookie store, and disposes it of when you close the incognito window. What I tend to do when viewing my code from the teamtreehouse workspace is just to copy the url for the preview and paste it in a new incognito window.

Another benefit of using the Incognito Mode is that you won't have any plugins or extensions, which in other case might interfere with your code or/and clutter up your console while you're developing.

Control-Shift-R refreshes without the cache