I am using the jQuery load() method to load some content from different HTML files for organizing purposes, but I am getting this error:
Access to XMLHttpRequest at 'XXXXX' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
My HTML file looks like this:
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(function() {
$("#Home").load("home.html");
});
</script>
</head>
<body>
<div id="Home"></div>
</body>