javascript - Is jquery.load() always considered cross site, even if the resource is local? -


i working on project based on ucdavis wayfinding library. have noticed unable load index.html page in browser if open file.

whenever open file url like:

file:///c:/some/folders/here/index.html 

i see error in js console:

xmlhttprequest cannot load file:///c:/some/folders/here/demo_map_2.svg. cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. 

i understand error telling me. , sure enough if throw project dropbox , access via public http link works fine.

the part don't though why considered cross origin request when svg file stored locally, right alongside html file?

is there way other hosting file under sort of webserver (or similar service dropbox) .load() function resolve on resource local same directory html file?


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -