In the documentation for the serial API there is an HTML sample that shows how to use it. I have made a very simple change that makes it more useful that I would like to share.
The problem with the sample page is that each time new serial data is received the old contents of the page are erased. The same is true of the serial monitor widget and the module status page. But I find when I am looking at a stream of serial data I want to look at the whole stream, going back to when I opened the page.
It's a very simple change. If you change the line that says:
document.getElementById('updateID').innerHTML = SerialData;
to
document.getElementById('updateID').innerHTML += SerialData;
Then the old data is kept.
It is very easy to implement this page. Just copy the code snippet on the page into a text editor like notepad, and save it onto your computer as a file with an HTML extension. Open that file in your browser.
Nick