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

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.