title: Reading a Linux system file using Javascript?
body: <p>I'm trying to update a page of mine which currently does not have a way to refresh the version number that is read from a file because the page is only generated once by a Python script. I decided to convert the page to a static page rather than a generated one and try to just read the information using JavaScript. The problem is that two of the files I need to read are <strong>/proc/cpuinfo</strong> and <strong>/proc/device-tree/model</strong>. The files are server-side.</p>
  
  <p>I can't seem to find any information on using <code>FileReader</code> with just a file path, and it seems to rely on the "file" input to provide a <code>File</code> object. I looked into using <code>XMLHttpRequest</code>, but would that even be able to read a file that is not under <strong>/var/www</strong>?</p>
  
  <p>The reason the Python script was able to read the files is because it is a cgi script and has sudo permissions.</p>
  
  <p>Do I have any options to do this with a static HTML page? Or will I need to keep the page generator script since those two files live outside the <strong>/var/www</strong> directory?</p>