I've enabled my site through netlify for https. But my js files are still loaded with 1.1 http protocol

I’ve enabled my site through netlify for https. But my js files are still loaded with 1.1 http protocol…

tastycuisinechinese.netlify.app

I have DNS set up as follows this and the by pass through cloudflare

porkbun >> cloudflare redirect >> tastycuisinechinese.netlify.app

I set up https and have enabled let’s encrypt. However my files downloaded via network panel in chrome shows that it is not https but http 1.1 protocol.

Could somebody please point me in the right direction? Thank you!

I can see h2 for your website:

Including all JS files:

which is basically HTTP/2. This doesn’t mean it’s not served over HTTPS. Every HTTPS connection is essentially using HTTP protocol. Read here: Introduction to HTTP/2  |  Web Fundamentals  |  Google Developers

However, I’m not sure why you’re getting 1.1.

Screen Shot 2021-05-08 at 6.53.15 AM

Recently, I’ve been noticing this happening again. I use this in incognito mode and still no way to find out why this is happening. It seems like it happens on each new deployment. Which makes me to wonder if there is some caching mechanism through netlify causing this or some dns caching?

Hi, @aznric3boi. The key here is that this is happening in your browser and the information to troubleshoot this is found there. No one else can reproduce this so we cannot use our own systems to diagnose this. We will need more information from you to troubleshoot.

Whether or not to use HTTP/2 or HTTP/1.1 is something the web browser and server negotiate. There is no reason on the Netlify side why HTTP/1.1 would be forced. However, our servers will use whatever protocol the client web browser requires. Here is the proof with curl:

$ curl -vso /dev/null --http2 https://tastycuisinechinese.netlify.app/_nuxt/316506f.js  2>&1 | egrep '^< '
< HTTP/2 200
< accept-ranges: bytes
< cache-control: public, max-age=0, must-revalidate
< content-length: 4526
< content-type: application/javascript
< date: Thu, 13 May 2021 04:39:23 GMT
< etag: "29344221ce7d2f71686a6e16605216aa-ssl"
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< age: 0
< x-nf-request-id: 43464ffd-2ce2-4121-a187-7db5735c11ff
< server: Netlify
<

HTTP/2 works.

$ curl -vso /dev/null --http1.1 https://tastycuisinechinese.netlify.app/_nuxt/316506f.js  2>&1 | egrep '^< '
< HTTP/1.1 200 OK
< accept-ranges: bytes
< cache-control: public, max-age=0, must-revalidate
< content-length: 4526
< content-type: application/javascript
< date: Thu, 13 May 2021 04:38:42 GMT
< etag: "29344221ce7d2f71686a6e16605216aa-ssl"
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< age: 47
< x-nf-request-id: 35995c03-b306-45af-a6f3-b12d46c500a5
< server: Netlify
<

HTTP/1.1 is used if forced by the client.

$ curl -vso /dev/null https://tastycuisinechinese.netlify.app/_nuxt/316506f.js  2>&1 | egrep '^< '
< HTTP/2 200
< accept-ranges: bytes
< cache-control: public, max-age=0, must-revalidate
< content-length: 4526
< content-type: application/javascript
< date: Thu, 13 May 2021 04:40:44 GMT
< etag: "29344221ce7d2f71686a6e16605216aa-ssl"
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< age: 0
< x-nf-request-id: 9e8127e9-d14d-4713-b44f-c017de3474df
< server: Netlify
<

If nothing is specified, HTTP/2 is the default.

To summarize:

  • If I force HTTP/2, it is used.
  • If I force HTTP/1.1, that is used.
  • If I do not specify, HTTP/2 is the default.

This is all normal and expected behavior.

It is possible there is something about your site or browser configuration requiring this. For example, perhaps it is the site’s service worker causing this?

If you see this again, it might help to send us the x-nf-request-id header for one of the HTTP/1.1 responses.