According to Same Origin Policy, SOP shouldn\'t apply to file:// protocol, but why my code does not work? I am running this testing page from my local system and I have abc.
This is not a bug, it's a security feature which you can't/won't get around on a client's computer.
In chrome you can disable it by adding the following flag on the command line
--disable-web-security
Firefox might have something similar but I don't know it. This is only useful for development purposes and you can't rely on this behaviour in your application.
You should really just use a server ...
A slightly safer command line flag than ''--disable-web-security'' is
--allow-file-access-from-files
This does not completely turn off all security features. Still also this flag should not be used in productive environments...