Wednesday, 6 November 2013

Google Chrome --allow-file-access-from-files flag, a solution or a workaround

--allow-file-access-from-files: This is an application flag so that some functions can run successfuly if initiated from the local filesystem rather than a web server.

The reason Google announces for this behaviour: Security!

After hours of searching the topic, I can tell my personal opinion  as this is a workaround for a problem caused by a poor security threat implemented workaround!

My root issue was: Being unable to transform an XML using an XSL within the same filesystem container (Folder in NTFS). I did receive blank page in chrome; however that worked fine in IE.

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="test.xsl" ?>


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:template match="/">
    <h2>My Tests</h2>
    <table border="1">
      <tr bgcolor="red">
        <td><xsl:value-of select="testing/T1/title"/></td>
        <td><xsl:value-of select="testing/T1/Item2"/></td>

More details about how to use this flag:


  1. Nice and helpful post to most of developers thanks for sharing with all of us. You can get more detail how to enable allow-file-access-from-file option for windows and linux here

    1. Thanks Ritivik for your comment, your link to your post, and good luck with your blog!