I know few firefox version allow to read file without http
or https
, Is there any way to read file in jquery or javascript with file://
protocol ? I am developing static application, which works well with web server, if I am able to do something similar to the job of below Jquery.ajax
function with protocol being file://
I will be very happy
This works well if I have web server (http/https
) what can be done for file://
?
$.ajax({
type: "GET",
url: "http://localhost/something/somefile.txt",
dataType: "text",
success: function(data){ dothis(data); }
});
What I will do if I don't have web server ? I know due to SOP (Same origin policy) modern browsers doesn't allow. Is there any alternate method to do the similar job so that which does support all browser with protocol being file://
?