var xhr = new XMLHttpRequest();
xhr.open("post", 'uploader.php', true);
xhr.setRequestHeader("pragma", "no-cache");
header('cache-control: no-cache');
$.ajax({
type: "POST",
cache: false,
url: "<?php echo esc_url( get_template_directory_uri() ); ?>/loadmore.php",
data: datastring,
success: function (msg) {
//do something
}
});