Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How about HTML/2
#1
The last tutorial in the Tutorials/Networking forum is why I am asking is Python HTML/2 compatible. What I am meaning... In HTML/2 a client can send multiple requests to the server once the connection is established and wait for responses. It's not necessary to send the request, get the response then send the next one. It can send all requests at once?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#2
Http2 is just a different way to use a socket, it isn't anything fundamentally different with how computers communicate.  So, yes, python can handle it just fine.

I haven't dug too deep into it yet, but my understanding is that (if the client indicates that it can handle http2), the server will push multiple documents through a single socket, instead of waiting for the client to request those documents later (likely over new sockets).  The main benefit being that things that always go hand-in-hand, like a css file, js, images, etc, will all go as a package deal, instead of waiting for the browser to start rendering the page to realize it needs more things.

The way I think it does this, from the little I've looked so far, is that the server sends a little header before each packet of data letting the client know which document that packet is for... similar to how emails work with different attachments and formatting (html and plain text in the same email).

It's something I'm interested in, so I'll definitely find out more how it actually works, and then probably do another "easiest possible" implementations, to make it clear how it works.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020