Search code examples
htmlcsswebserver

How long does it take for my own website to fully update and show the new changes that I have made?


I have recently made some changes to my website, like changing the font, customised the scroll bar and positioned some elements. After uploading it to my web hosting server, I have noticed that nothing has changed.

I know that by clearing the cache in my browser I can see the changes and everything's perfect, but is there any other way? If I wait longer , will the changes automatically be made? if so, how long will it take?


Solution

  • That's basically the point of caching: information will be outdated for some who have cached content, but that cached content will load a lot faster for them and they don't need to re-download everything from your server all the time. You can control how long and how exactly clients should cache your content by setting appropriate HTTP headers. How to do that exactly will differ based on your server/host. But in the end it's always a tradeoff between loading speed (more cached content, fewer requests on subsequent visits), server load (more caching, fewer requests, less server load, more capacity for more users), and information not being entirely up to date.