Could not find dup, so let me know if there is one
I am trying to create static one page website (to host it on neocities). I use jquery's load()
function for that. It works fine in Firefox (and Edge) but not in Chrome.
Here is index.html
:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div id="partial-page-load-section"></div>
<script src="jquery-1.12.4.min.js"></script>
<script>
$("#partial-page-load-section").load("partial_page.html");
</script>
</body>
</html>
and here is partial_page.html
:
<h1>This is partial page</h1>
Error message by Chrome:
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Screenshot (Chrome one the left, Firefox on the right):
Questions:
- Does Chrome solve some kind of vulnerability by not allowing me to do what I am trying to do which would not have been possible to solve in any other way other then completely preventing me from doing what I am trying to do?
- If somebody were to try to exploit vulnerability which Chrome is trying to fix by blocking my request, how would they go about it?
- Does that mean that Firefox (and Edge) are (more) vulnerable to XSS or CORS (or something else)?
file
orhttp
?file