I am sending data to log.php
Due to window.location page is redirecting when sending data.
can i send data to log.php without redirecting current page?
setTimeout(function(){ 
var a = "http://example.com/log.php?c=";
window.location = a+trim;
});
` this would also work when javascript is disabled (though in 2020ish that's not really a concern)
        – apokryfos
                Dec 26 '19 at 10:30