Showing posts with label Chrome. Show all posts
Showing posts with label Chrome. Show all posts

Tuesday, May 21, 2013

Chrome error: Cross origin request are only supported for HTTP

If you are trying to load a XML that is on you local computer you might get and error that looks like this:

Cross origin requests are only supported for HTTP

Use --disable-web-security via the command prompt to remove this error. Watch the video for more details.



Get the files here

Load a XML file using JavaScript in Chrome

If you are trying to load a XML that is on you local computer you might get and error that looks like this:

Cross origin requests are only supported for HTTP

Use --disable-web-security via the command prompt to remove this error. Watch the video for more details.



Get the files here

Check for the various File API support in Chrome and Firefox

At some point you might want to check to see if your browser supports HTML5 file API's. The code below will show you how. The video below will show you how to run the code in the console window for Chrome and Firefox.


<!doctype html>
<html lang="en">
<head>
<script>

function checkFileApi()
{
// Check for the various File API support.
if (window.File && window.FileReader && window.FileList && window.Blob) {
console.log('Great success! All the File APIs are supported.');
} else {
console.log('The File APIs are not fully supported in this browser.');
}
}

</script>
</head>
<body>
     
</body>
</html>