Problem with browsers

Asked

Viewed 82 times

2

I am new to web development and I have a problem that I believe is more basic, but it is causing me problems. When I change my CSS , JS or HTML and update the page in Chrome to analyze the site and see how it looks, the site continues with the old formatting. This happens sometimes, not always. But when it happens it delays me a lot.

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 always when I inspect the elements, it differs from what I edited in my files.

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

  • I’m not an expert on this, but it is possible to stop this kind of cache through the server, for example: with PHP. If I’m not mistaken. htaccess also allows you to stop caches. If the file already has cache, then it will be better to change the site location and disable the caches. If you are doing these server-less tests it will be better to start using a local server.

  • Cltr+F5, works here....

2 answers

5

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. inserir a descrição da imagem aqui

Whenever your inspect element is open the cache will not be saved in the browser, is what I use to develop and works well.

0

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

i always use hard Reload, because it has hot key, but you can use the last option that will do hard Reload and clear the cache.

In order to speed things up a bit, you can try using some of these tools: gruntjs, gulpjs, webpack, jest or npm(scripting) or some other "http-server" in conjunction with some task Runner (cited earlier).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.