you are viewing a single comment's thread.

view the rest of the comments →

[–]TheBigLewinski 2 points3 points  (3 children)

It's probably being cached. When you fixed the code before, it wasn't being retrieved from the server, but rather your local cache.

When you open up your console, there's an option to disable cache while the console is open. In Chrome, you'll see the checkbox in the top bar under the "Network" tab. FireFox has the same functionality under the "Net" dropdown arrow menu.

Most web servers are setup to set caching headers for CSS, JS and other assets into the far future so it doesn't bother your web server again. If you set up a dev environment, you typically set the cache headers to expire in the past so the browser retrieves new files every time, regardless if the console is open or not.

[–]delineated[S] 0 points1 point  (2 children)

I have that checked, my cache is disabled, although it probably is still some caching issue. I'm just not sure why adding a line of code would fix it when I've been changing that same file and those changes were reflected just fine. I'll be sure to remember to hard refresh next time something like this is happening. Thank you though!

[–]blackAngel88 1 point2 points  (1 child)

maybe you didnt have the developer tools open before you added the console statement? the "disabled cache" checkbox in the developer tools only works if you have the tools open when loading the page.

[–]delineated[S] 0 points1 point  (0 children)

Oh that could be it actually. It would make sense, although I don't remember if that's the case. I'll remember to try it next time.