JS-Dev-101 practice question 23 of 25

After user acceptance testing, the developer is asked to change the webpage background based on the user’s location. It works on the developer’s computer but not on the tester’s machine. Which two actions will help determine accurate results?

Full set: 148 questions
Answer options
A: The tester should disable their browser cache. Correct answer
B: The developer should inspect their browser refresh settings.
C: The tester should clear their browser cache. Correct answer
D: The developer should rework the code.
Correct Answer:
A. The tester should disable their browser cache.; C. The tester should clear their browser cache.
Explanation

The described scenario, where code works for the developer but not for a tester, is a classic symptom of a browser caching issue. The tester's browser is likely serving an older, cached version of the JavaScript or CSS files. Clearing the browser cache or disabling it entirely for the session will force the browser to download the latest version of all assets from the server, ensuring the tester sees the most recent changes.

Why Incorrect

B. The developer's browser settings are irrelevant because the feature is already working correctly on their machine.
D. Reworking the code is a premature step. Environmental factors like caching should be eliminated as the cause before assuming a code defect.

References

1. Mozilla Developer Network (MDN). "HTTP caching". "When a user hits a back button or clicks a link to a page they've just visited, the browser can pull that page from its cache... This is why you sometimes need to do a 'hard refresh' or clear your cache to see changes on a website."

2. Salesforce Help. "Clear your browser cache and cookies". This official Salesforce documentation recommends clearing the cache as a primary troubleshooting step for display and performance issues.

Scroll to Top