Updated web.js with reading from index.html