Browser problem

2

I'm new to web development and I'm having a problem that I think is more basic, but it's causing me problems. When I change my CSS, JS or HTML and refresh the page in Chrome to review the site and see how it got, the site continues with the old formatting. This is sometimes, not always. But when it happens it really slows me down.

I have tried to empty the browser cache, but it does not resolve. I updated the page several times and saved the files in the right place. But whenever I inspect the elements, it differs from what I edited in my files.

How to solve this problem and how do I optimize my productivity and avoid these types of problems?

    
asked by anonymous 11.01.2017 / 21:54

2 answers

6

Press CTRL + Shift + I to inspect the page element, go to the Network tab and check the Disable cache checkbox, as shown in the image below.

Whenever your preview element is open the cache will not be saved in the browser, it's what I use to develop and it works fine.

    
11.01.2017 / 23:57
1

In addition to disabling the browser cache as in the previous response, leave the inspector / inspector window open (needs to be open), click and hold the reload button on the side of the address bar, and you will see that some other options reload will appear ...

I always use hard reload, because it has a shortcut key, but you can use the last option that will do the hard reload and clear the cache.

In order to speed things up a bit, you can try to use some of these tools: gruntjs, gulpjs, webpack, jest or npm (scripting) or some other http-server in conjunction with some task runner (mentioned above) .

    
12.01.2017 / 04:46