Some of our users still use the old version of the site (perhaps the tab is not closed in the browser). This version of the site (the old one) makes an Ajax call to our web server and inserts the response as a string (without Eval (), i.e. JS code does not work).

Is there any way to reload this page from our server?

Sample user script:

function openPOST(url, params, callback) { var xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST", url, true); xmlhttp.setRequestHeader('Content-Type', "application/x-www-form-rlencoded"); xmlhttp.send(params); xmlhttp.onreadystatechange = function() { if (this.readyState === 4) { if (xmlhttp.status === 200) { if (callback) callback(this.responseText); } } } return xmlhttp; }; document.addEventListener('DOMContentLoaded', function () { ... function go() { openPOST("/home/someaction", "query=123", function (count) { document.querySelector("h1").textContent = count; }); } ... go(); ... }); 

I tried to replace the old action on this one.

 public void someaction() { Response.Status = "307 Temporary Redirect"; Response.AddHeader("Location", "http://example.com"); } 

Instead of the desired page reload, the entire code of the page http://example.com inserted into document.querySelector("h1").textContent

    0