jquery - Unable to load a text through a local host -
question: why error suggests "different-origin" material, , how fix it? i'm trying recreate this simple example (click on "try yourself") on machine using python's simplehttpserver. i've created demo_test.txt (with same contents example). demo_test.txt , jquery-2.1.4.min.js both in root directory server started. code runs fine until tries access demo_test.txt, @ point gives error: xmlhttprequest cannot load file:///users/username/project/demo_test.txt. cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. if instead try load them urls (commented out lines) different error: no 'access-control-allow-origin' header present on requested resource. i understand bit same-origin policy, must somehow violating it. can me out? <!doctype html> <html> <head> <script src="jquery-2.1.4.min.js"></script> <!-- <scr...