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 questionsThe 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.
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.
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.
Keep practicing
Take the free JS-Dev-101 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other JS-Dev-101 practice questions
- Question 1A developer executes: document.cookie; document.cookie = 'key=John Smith'; What is the be…
- Question 2A developer is required to write a function that calculates the sum of elements in an arr…
- Question 3Given the code below: 01 const delay = async delay => { 02 return new Promise((resolve, r…
- Question 401 function Animal(size, type) { 02 this.type = type || 'Animal'; 03 this.canTalk = false…
- Question 5Refer to the code snippet: 01 let array = [1, 2, 3, 4, 4, 5, 4, 4]; 02 for (let i = 0; i …
- Question 6Code: 01 let array = [1, 2, 3, 4, 4, 5, 4, 4]; 02 for (let i = 0; i < array.length; i++) …
