I've encountered a bizarre issue that seems to be exclusive to MS Edge and affects only certain users at one particular client. When making an ajax call to the server, instead of receiving the expected response data, it appears that some source code from the platform is being stored in the variable. The code snippet provided below illustrates this strange behavior. What could possibly be causing this? We're unable to replicate the issue ourselves, but we can conduct screen sharing sessions with affected users to confirm the problem.
Here's the Ajax code:
console.log("Calling: " + api);
$.ajax({
url: api,
cache: true,
error: function (XMLHttpRequest, textStatus, errorThrown) {
displayExceptionNotification("Error on call to " + api + ": " + errorThrown);
}
}).then(function (theData) {
// Process the server response
}
Instead of receiving the JSON data as expected, the 'theData' variable seems to contain the content of an unrelated .js file. This observation is made possible by remotely viewing/sharing the screen with the user and using the inspect/debug tool to hover over 'theData' value - reference the attached screenshot. It's puzzling why this strange inconsistency is occurring, as the subsequent code execution expects JSON but receives raw JavaScript source code, leading to failures.
Any insights?