| 18:40 | <virmaha> | I've put a 280 MB video on dropbox. I wrote a simple html page to show the video. In network tab of chrome, the content-length in response header is 380 MB but the time is 3.67s and Size column shows 3.1 MB. Why is that? There's no way my browser downloaded 280 MB vid in 3.67s. Can someone help? |
| 18:47 | <TabAtkins> | It looks like the browser downloaded 3.1MB of the file in 3.67 seconds, which is reasonable? And then didn't do more yet, presumably because you haven't started playing the video. |
| 18:50 | <ondras> | virmaha: check out https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests |
| 18:53 | <virmaha> | TabAtkins: so then why is content-length shows as 280 MB when the data sent was 2.1 MB? |
| 18:53 | <virmaha> | 3.1* |
| 18:53 | <virmaha> | ondras: yeah I did read but it doesn't answer my query. |
| 18:54 | <TabAtkins> | Because the browser implicitly made a range request, like ondras said. |
| 18:54 | <TabAtkins> | The content-length is still the full size . |
| 18:54 | <ondras> | virmaha: are there any Range-related headers present in the request/response? |
| 18:54 | <virmaha> | yeah ondras |
| 18:54 | <ondras> | virmaha: that is because the content's size *is* 280MB |
| 18:55 | <virmaha> | request was for Range : 0- |
| 18:56 | <ondras> | virmaha: can you show the complete set of response headers? preferrably unfiltered by your browser's devtools, i.e. a wireshark/tcpdump output |
| 18:56 | <virmaha> | I thought I'd see content-length 280MB only after the entire video was downloaded |
| 18:57 | <ondras> | it could also have been a HEAD request |
| 18:58 | <virmaha> | no it was a GET request. I saw..Let me give you tcpdump output |
| 19:00 | <virmaha> | at a high level, I'd imagine it this way. Range request comes in for bytes 0- , I get the filename and start and end range, I set appropriate headers, read the file as per offsets and then send the content. |
| 19:03 | <Maranatha> | So. The Internets... |
| 22:16 | <KiChjang> | how recent is the "invention" of promises? |
| 22:16 | <KiChjang> | it feels like there are still some details about it that has yet to be ironed out |
| 23:28 | <TabAtkins> | Official JS promises are, what, two years old now? Something like that. They showed up in libraries substantially earlier, and have showed up in other languages before that. |
| 23:28 | <TabAtkins> | What do you think needs to be ironed out? |
| 23:34 | <KiChjang> | TabAtkins, i mean that i still see TC39 proposals that extend/enhance the usability of promises |
| 23:34 | <KiChjang> | perhaps having a special syntax like await? |
| 23:37 | <TabAtkins> | Yeah, we're still adding new stuff. |
| 23:41 | <GPHemsley> | a form on an HTTP page submits sensitive data via an HTTPS form action... how safe is this data? |
| 23:46 | <GPHemsley> | let me google that for me... |