Tag Archives: /data

[Chrome Error] Cross origin requests are only supported for protocol schemes: http, data,chrome-extension

Using Ajax to request local files, chrome will report cross domain error: XMLHttpRequest cannot LoadFile:///C/users/Li/desktop/images/alist.json.cross origin requests are only supported for protocol schemes: http, data, Chrome extension, HTTPS, Chrome extension resource

solution:

Add a startup parameter to chrome: — allow file access from files

specific method:

Right-click the browser shortcut – properties – Shortcut – target, as shown in the figure below: