Some people know this feeling only too well. A web application is running in production and is being developed all the time. Another stage of work ends (for example a sprint), everything has been tested and polished, and all that is left is deploying to the server. The momentous event happens, someone clicks through the new version one last time, the client is told about the update, and then the next day the software house gets a message that users cannot see the changes or that the application behaves strangely.
The programmers then mutter the classic "weird, it works for me" and check again. They go to the server that users access, log in, do the same things and it turns out that all the new elements are there and work correctly. So the same version of the application on the same server works for one user and not for another. Who is right in such a situation: the client reporting the bug, or the programmer who, despite every attempt, cannot reproduce it and swears at their laptop that everything is fine?
The answer is: nobody, and both at once. This kind of behavior is frustrating because several variables are involved: the browser, the environment (for example, it can matter which cookies are stored in the application), the user, their permissions and so on. And cache plays a big role too. For the sake of performance, it can keep an old copy of a page or part of it. Then unexpected things really can happen: new changes that do not show up, or even bizarre results returned by the IT system.
Even though nobody is clearly to blame and nobody is clearly right, the matter has to be resolved or at least investigated somehow. The problem is that if the programmer cannot reproduce the issue on their side, they have to see it on the client's side, and that is sometimes difficult. So you need a procedure that not only clears things up but also shows that the software house handles the matter professionally.
This text is a guide for such occasions, and we will describe the most common steps to take. First, though, let's explain more precisely what the problem may (but need not) be. We will stay within web applications, although desktop applications have similar problems, even if logs are easier to handle there.
Application "hallucinations"
I deliberately used the word "hallucinations," even though the topic has nothing to do with artificial intelligence, where the term describes output of an LLM (Large Language Model) that has lost touch with reality. In everyday use the word means delusions, false visual experiences, and that fits the situation users may find themselves in when an application does not load properly.
The cause usually falls into one of two areas. The first is the cache mentioned above, which works like a store of ready-made, previously computed results so they can be served to the user faster next time. Modern IT systems are dynamic: when a user opens a page, the software has to "calculate" the content it will show, for example fetch information from the database, process it and then generate the right HTML. That takes time, and if you consider that a page may be displayed many times and the process is the same each time, it is easy to conclude that the second, third and later requests can be faster as long as you keep the intermediate results. That is exactly what a cache does. It can work at many levels, but in the context of today's text we are most interested in the user's browser. Opening a web page actually means telling the browser to download not only the HTML itself but also JavaScript scripts, CSS files, images and so on. So for some time they are cached, so that the user sees the page faster on the next visit. This applies especially to static files, which is what JS and CSS files are considered.
JS files matter most for our problem, because modern frontends are usually (though not always) written with JS frameworks, where the index.html file is only a kind of starting point and the whole application lives in JavaScript bundles. So the browser does not always register the replacement of these resources and refresh them right away, and just after a deployment the user may still see the old files and get the impression that nothing has changed.
The second most common reason for "it works for you, but not for me" is user permissions. The application may not have been tested well enough from the perspective of a user with a particular role, or the combination is so unusual that the software, to put it colloquially, "lost it." Sometimes it is in fact correct behavior of an application that handles permissions properly, but in the given case it is not clear to the client. Unlike cache problems, which sometimes occur only for one person on their computer, programmers can investigate a user's privileges remotely or "on their side."
The question remains how to go about solving such an issue once it occurs. There are a few methods and tips that you can pass on to the client one by one.
Clearing the browser cache
When a programmer hears that something loaded incorrectly for a user after a deployment, the usual advice is "please hard refresh the page." All right, but what does that actually mean?
If we want to reload the page we are on, we usually select the URL and press ENTER or, even faster, press the F5 key, which in most browsers is assigned to refresh. This is what you could call the "soft" or normal version of the operation: it reloads only the page, fetching data again, for instance, while static files are usually still restored from the cache. To force the browser to download those resources again as well, replace the single F5 key with CTRL + F5 or CTRL + SHIFT + R, depending on your preference, browser and operating system (on macOS you usually read CTRL as CMD, also known by the symbol ⌘). A list for each environment can be found, for example, in this article.
One more fact is worth mentioning here, which we noticed at one of our clients, where pressing CTRL + F5 on Windows again and again did not help. It quickly turned out that some laptop models have the behavior of the function keys (F1 to F12) changed by default and treat them as if the Fn key, usually located between the left CTRL and ALT, were switched on. That key activates the alternative meaning of keys, such as raising the volume or switching the screen. As you can see, some notebook manufacturers decided that the "second" functions matter more than the original ones, so instead of CTRL + F5 you have to press CTRL + Fn + F5 to get what would normally take two buttons. Of course, this can be switched in the system settings, but the author of this article admits that setting up a keyboard like this by default is one of the sillier practices he has seen lately.
Back to the hard refresh: in most cases it removes the problem. Sometimes you need to do it several times, but in the end the page files should load anew, and then it turns out that the cache really was the problem. Fortunately.
Switching browsers
Sometimes that does not happen and the trouble continues. Then, before taking other steps, it is worth trying another browser or at least incognito mode, if no other browser is installed on the computer. Remember that the cache and local files are stored not for the whole system but for a specific program that displays web pages. It is easy to notice: if we log in to our account on a website with Chrome, we will still be logged out after switching to Firefox.
Of course, a hard refresh should also solve the problem in the same browser, but checking another one does not hurt, for other reasons too. The first is problems with the website itself in a specific browser. That happens, and while it is of course nothing for programmers to be proud of, it is worth verifying. The second is extensions that users have installed in the browser, which in extreme cases can interfere with how the page works. This group also includes various unusual configuration choices, such as limiting JavaScript loading.
Clearing application data and cookies
Before we go further, there is one more thing to check. The old and new versions of the application may store data in cookies or local storage in different ways. These are places where various user information ends up, such as the token used after logging in to a service or the acceptance of profiling on a website. In the past we have seen cases where a change in how such data is stored led to strange situations in which the application could not correctly interpret values the user already had in the browser.
To be safe you can clear them, and here you need to get to know something called developer tools (DevTools), which in most browsers opens with the F12 key or by right-clicking anywhere on the page and choosing an option such as "Inspect." A panel with several tabs appears, offering huge possibilities, and we will come back to it later today. For now we are interested in the "Application" section and what is visible under "Local storage" or "Cookies" for the page in question. It is worth clearing that data by right-clicking an item and choosing "Clear," but be careful: most often this also means you will be logged out of the site.
Permissions
If clearing the browser and trying another one on the same computer did not help, it is worth checking with another user whether they have similar problems. This is common in applications meant for a specific team or company, and we have often received reports like "it works for my colleague, but not for me." Assuming it is not the cache's fault, it is worth asking the "victim" for a cross test, that is:
- another user tests the given function on their side,
- if there were no problems, that user logs in to their own account on the "victim's" computer, if possible.
The point here is, of course, to check the permissions or other characteristic account data. Most often at this stage it turns out that the trouble comes from unequal privileges, and that is very important information for the programmers, who will then check the application's behavior with this in mind. It need not be only a role, meaning a package of permissions. Sometimes it is the link between the user and specific objects in the system, which means the IT team has to look at the situation more closely using an account equivalent to that of the affected person. How they do it depends on internal arrangements between the software house and the client.
However, such a test can also reveal a case where the affected person's computer itself is somehow at fault. This rarely happens, but here again browser extensions come into play, as does a connection to a different network. There have been cases where the problem came not so much from the application as from a firewall configuration, although it must be said that these are very rare circumstances.
Browser data
Finally, if after so many attempts the problem still occurs for the affected user and the only alternatives are visiting them or sharing their screen remotely, what remains is to collect the right data, which may shed light on the matter. Here we return to the Developer Tools mentioned above, which will come in handy again.
The first thing is to check what the JavaScript console looks like (the "Console" tab). There is a good chance it will contain many red messages, which of course means errors. Important information is often found there and should be copied and analyzed later.
Important things can also be found in the "Network" tab, where requests that ended with an error may appear in red. It is worth clicking such entries and copying the data from the "headers," "payload" and "response" subtabs. This information is also important for the programmer, although it should be said that if something showed up here, it can usually also be found in the server logs. With the JS console, unfortunately, it is not that easy.
For the second tip, a few additional points are worth mentioning. First, entries here appear only after the page is refreshed (in any way), and if there is nothing in "Network," pressing F5 is probably enough. Second, this tab also lets you tick the "Disable cache" option, which is worth trying when looking for the source of an error. It works similarly to the hard refresh discussed earlier.
Patience is a virtue
The title of this section sounds like a bad joke, but it makes sense when the situation involves a huge application that is scaled horizontally. We mean services that run not on one server but on many, duplicating their code to balance the load and using a load balancer for that. This kind of setup helps not only to keep the site's throughput adequate but also to cope with failures. How? For example, a new version can be deployed to only some of the servers, incrementally, to verify that everything works as it should. Then for some time users who land on the "new" servers already see the changes, while the poor souls (or lucky ones) redirected to the "old" machines do not yet experience the modifications. They have to wait until the deployment completes on all machines and those start serving the new version of the service too.
We should know this mechanism well from the situation when a new change appears in a big service (for example on Facebook) and everyone is talking about it, while we cannot see it yet despite refreshing the page over and over. That means we are probably hitting a server (that is, we were directed there by the service's internal "distributor") that does not yet have the change, or we are not in the control group of users who get to experience the modification. However bad that sounds, it is a planned action by the software vendor and you simply have to wait.
How to prevent this
Of course, all these tips apply after the fact, that is, once the user is unhappy and the programmers are wondering what to do. So it is worth knowing how to reduce how often such events happen. Above all, be aware that the browser caches files with the same names, or more precisely, requests pointing to files with the same URL. A common technique to get around that is to add suffixes after a question mark, most often random numbers. The browser then "thinks" it is a different file and does not cache it. It is a simple technique, but it inevitably means the cache will not work even in the situations where it should, that is, when the page needs to be sped up. You can't have it both ways.
You can also simply tell the browser that the site's data should not be cached using the appropriate options of meta tags, that is Pragma and Expires. In general it is worth looking into the term "cache control" for HTTP requests, and in particular the header called Cache-Control. We also recommend reading this text, which has more information about browser caching and examples of how big sites "deal" with it.
JS frameworks also allow different naming of the files produced by building the application. Both React and Angular let you extend the name with a random hash, in a way that should not break proper caching. This "addition" stays constant for one deployment and changes when a new version is built, which forces the browser to download the file again. At least it should, because let's say it varies in practice, since index.html itself is also kept in the cache.
For problems resulting from permissions there is really no other way than managing this aspect of the system more carefully, better verification and preparing test cases or test users with whom you can verify various scenarios manually or automatically.
Summary
This article was meant both for programmers and for users who complain about this kind of ailment. And since each of us is a user of one application or another, in theory it is a text for every consumer of web pages. Above all, remember what a hard refresh is, and the fact that programmers are not always the culprits of a situation that hits the user. With emphasis on "not always."
Best regards and thank you, Jakub Rojek.


