These are chat archives for rosshinkley/nightmare

6th
Sep 2016
Rob Brackett
@Mr0grog
Sep 06 2016 01:03
@benjick are you asking about the field named content-type in the headers argument or the type argument?
if the former (in the headers argument), no, it's the mime type of whatever the server is sending back for the URL (at least according to the server; it could be a lie ;)
e.g. text/html for HTML, image/jpeg for a JPG, etc.
headers['content-size'] would be the size of the payload, but again, it's just what the server says, and may not always be present (that's the case in many systems, especially anything that is streaming content out, where the size can't be determined ahead of time)
Rob Brackett
@Mr0grog
Sep 06 2016 01:08
The type argument is kind of like headers['content-type'], but less specific—it explains a general category of what the browser is loading the content for, e.g. mainFrame (the page itself), subFrame (HTML in an <iframe> or <object>), stylesheet, script, etc.