http2

Why is Chrome queueing up requests when using HTTP/2?

一世执手 提交于 2019-12-05 10:24:16
I have a site that is using HTTP/2, and the site is slow to load images. Looking at Chrome's Devtools, most of the time is spent in "queueing" the network requests for the images. My understanding is that with HTTP/2, multiple requests may be made simultaneously over the same TCP connection, but I am seeing that Chrome is only issuing 6 requests simultaneously and queueing the rest (as if it were using HTTP/1.1). I know that it is using HTTP/2 since the "protocol" column in the "Network" tab says "h2". Why is Chrome queueing up these requests instead of sending them in parallel? 来源: https:/

Does SPDY/HTTP2 concatenates responses?

旧时模样 提交于 2019-12-05 08:13:14
I have a question about SPDY/HTTP2: Normally you concatenate multiple CSS and JS files into one file to save requests and to get a better performance. I heard that SPDY/HTTP2 combines multiple requests into a single response. Would that mean that I don't need to pre-concatenate CSS and JS files anymore, because this is handled by the protocol? To say it in other words: Can I use <script source="moduleA.js"></script> and <script source="moduleB.js"></script> with SPDY/HTTP2 in the same way as I would use <script source="allScripts.js"></script> with HTTP1? Is this the same from a response

HTTP 2 request in python 2.7

烈酒焚心 提交于 2019-12-05 03:39:42
Is there any difference in making request to HTTP/1 and HTTP/2 in python. I can make HTTP/1.x calls in python like url = 'http://someURL' values = {'param1' : 'key', 'param2' : 'key2'} data = urllib.urlencode(values) print data req = urllib2.Request(url, data) response = urllib2.urlopen(req) the_page = response.read() print the_page Is python supporting making HTTP/2 by default or should I add anything extra. As others mentioned in the comments to the question the requests library does not support HTTP/2. From the requests library documentation : Requests allows you to send organic, grass-fed

Performance benefit of http/2 over http for single request

我的未来我决定 提交于 2019-12-05 01:58:57
问题 http/2 is much better than http for websites. It's very helpful if you have to make multiple http calls. But is there any significant benefit for a single call? 回答1: There are general considerations and specific considerations. The general considerations is that HTTP/2, being a binary protocol, is much easier to implement and has many less corner cases than HTTP/1.1. For example, the fact that HTTP/1.1 headers needs to parsed without knowing in advance header name length and header value

Does using image sprites make sense in HTTP/2?

谁说我不能喝 提交于 2019-12-05 01:14:16
The bundling of JS and CSS files won't be necessary in HTTP/2 , but what about image sprites? Looking at the demo it seems that it already works way faster than HTTP/1.1, but won't bundling images into sprites make it even faster? I mean, won't the PNG's optimization algorithms work better when all the data is in a single file? It depends of your image(s) sizes and format. If the images are big enough, you won't gain much by using sprites, but for small images there are significant gains, even when using HTTP/2. What makes HTTP/2 better is that there is much less overhead for headers and

Which parts of HTTP/2 are stateful?

主宰稳场 提交于 2019-12-04 23:47:38
问题 Unlike stateless HTTP/1.0, HTTP/2 has stateful components. These parts appear stateful: opportunistic encryption framing layer header blocks This part appears to be stateless: application layer Are there any other parts of HTTP/2 are stateful? 来源: https://stackoverflow.com/questions/33682693/which-parts-of-http-2-are-stateful

HTTP/2 support in Tomcat 8

你说的曾经没有我的故事 提交于 2019-12-04 22:36:28
After some research, I was surprised that I did not not find any resource on HTTP/2 support in Tomcat. Changelogs of 8.0 indicate an experimental support of SPDY and wiki refers to HTTP/2 as a supported spec ( http://wiki.apache.org/tomcat/Specifications ) but I don't find any tutorial on it. Do you know if it is already possible to enable HTTP/2 on Tomcat? If the answer is yes how I can do that? Mark Thomas Tomcat does not yet support HTTP/2. HTTP/2 support is planned for Tomcat 9 onwards. It may get back-ported to earlier versions. The experimental SPDY support was just that: experimental.

Http2 - server-push with nodejs pushStream method do not working

梦想与她 提交于 2019-12-04 20:18:21
I am studying http2 on nodejs , but find out a issue pushStream method not working (client side do not show "Pushed/[fileName]" on developer tool) I wonder if the reason is nodejs version (i installed the latest version v9.8.0) My codes is the following : server.js 'use strict' const fs = require('fs'); const path = require('path'); const http2 = require('http2'); const utils = require('./utils'); const { HTTP2_HEADER_PATH } = http2.constants; const PORT = process.env.PORT || 3000; // The files are pushed to stream here function push(stream, path) { const file = utils.getFile(path); if (!file)

HTTP/2 Server Push in iOS 10

北慕城南 提交于 2019-12-04 14:39:27
I am trying to get server push working on iOS 10. I am working off of the Akamai HTTP/2 demo. https://http2.akamai.com/demo The following is my attempt at testing server push. @interface ViewController () <NSURLSessionTaskDelegate> @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; NSURLSessionConfiguration *defaultConfigObject = [NSURLSessionConfiguration defaultSessionConfiguration]; NSURLSession *defaultSession = [NSURLSession sessionWithConfiguration: defaultConfigObject delegate: self delegateQueue: [NSOperationQueue mainQueue]]; NSString *displayArtUrl; for

Use Http/2 to make api calls from javascript

拟墨画扇 提交于 2019-12-04 13:48:59
I know most browsers support http/2 for loading the pages but does this mean I can leverage it when I make api calls using XmlHttpRequest ? More specifically my question is if I make 2 calls to fetch data using XmlHttpRequest does it ensure that both of them use the same tcp connection underneath ? None of the documentation I read any where specifies any thing about http2 support for XmlHttpRequest or how I can explicitly open a http2 connection, make some calls leveraging this and then close the connection. The okHttp, jetty and other libraries in java offer client libraries to support this.