I'm trying something really simple but for some reason it doesn't work :
index.html :
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>SyriLab</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header></header>
<div id="content"></div>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/poper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/functions.js"></script>
<script src="js/main.js"></script>
</body>
</html>
js/main.js :
window.onload=function(){
main();
}
function main(){
$("header").load("./pages/header.html");
$("#content").load("./pages/home.html");
}
Errors I get when I launch index.html :
Failed to load file:///E:/Dev/Eclipse/SyriLab/pages/header.html: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Failed to load file:///E:/Dev/Eclipse/SyriLab/pages/home.html: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Everything is local, same root, I'm just trying to make a basic html page, including bootstrap and jquery (poper too, not sure what it is but was on the bootstrap page). And using something similar to "include" in php, but with regular js and html.
What am I doing wrong here ?