Hi all. I threw out this Tweet into the Twitterverse, but thought it would be wise to ask for help here as well.
// Detect dark theme
var i...
For further actions, you may consider blocking this person and/or reporting abuse
Hey, signed up just to tell that http2 was not working on my Netlify site.
Turns out it was due to a firewall (Avast -> Web Shield -> Turn off "inspect https requests")
If sites like http2.pro/ tells you http2 works on your site, but both Chrome and FF show https1.1 protocol, I suggest you inspect your site from another computer/network and turn off your computer protections...
This is a really annoying thing if ubiquitous user software like Avast start to prevent website optimizations we work hard to setup...
Thanks for the heads up Sebastien!
So I'm actually on the wrong track. What I mention in the post is to enable HTTP2 Server Push which is an optional thing. The pages should be serving over HTTP2. @easyaspython put me on to the right track, but still not solved.
It should use HTTP 2 by default. It looks like all the requests that are HTTP 1.1 from the iamdeveloper domain are being loaded by a service worker. I reckon that has something to do with it.
Yeah that was what @easyaspython had guessed. So I guess a false reading from lighthouse?
It's apparently a bug with Chrome and Lighthouse.
Description
I deployed my prodution and staging site on Netlify and I got reports from Lighthouse audits that some my resources are being served in HTTP/1.1 protocol which it shouldn't do that.
I found out later that all of the resurces that being served in HTTP/1.1 are from ServiceWorker. I think there's some issue with
gatsby-plugin-offineSteps to reproduce
Expected result
ServiceWorker should serve cache in HTTP/2 protocol
Actual result
It served in HTTP/1.1 protocol
Environment
gatsby-config.js
Source
package.json
Source
{ "name": "rayriffy-blog", "description": "The Nerdy Blogger", "version": "1.0.10", "author": "Phumrapee Limpianchop <contact@rayriffy.com>", "bugs": { "url": "https://github.com/rayriffy/rayriffy-blog/issues" }, "dependencies": { "cross-env": "^5.2.0", "gatsby": "^2.0.91", "gatsby-image": "^2.0.26", "gatsby-paginate": "^1.0.16", "gatsby-plugin-feed": "^2.0.8", "gatsby-plugin-google-analytics": "^2.0.9", "gatsby-plugin-google-fonts": "^0.0.4", "gatsby-plugin-manifest": "^2.0.13", "gatsby-plugin-netlify": "^2.0.5", "gatsby-plugin-netlify-cache": "^1.0.0", "gatsby-plugin-offline": "^2.0.21", "gatsby-plugin-react-helmet": "^3.0.5", "gatsby-plugin-robots-txt": "^1.3.0", "gatsby-plugin-sharp": "^2.0.17", "gatsby-plugin-sitemap": "^2.0.4", "gatsby-plugin-typography": "^2.2.5", "gatsby-remark-copy-linked-files": "^2.0.8", "gatsby-remark-embed-gist": "^1.1.5", "gatsby-remark-embed-spotify": "^2.0.2", "gatsby-remark-images": "^3.0.1", "gatsby-remark-prismjs": "^3.2.0", "gatsby-remark-responsive-iframe": "^2.0.8", "gatsby-remark-smartypants": "^2.0.5", "gatsby-source-filesystem": "^2.0.16", "gatsby-transformer-json": "^2.1.7", "gatsby-transformer-remark": "^2.2.0", "gatsby-transformer-sharp": "^2.1.10", "lodash": "^4.17.11", "prismjs": "^1.15.0", "prop-types": "^15.6.2", "react": "^16.7.0", "react-adsense": "^0.0.6", "react-dom": "^16.7.0", "react-helmet": "^5.2.0", "react-icons": "^3.3.0", "react-typography": "^0.16.18", "riffy-gjs-embeded-video": "^1.3.1", "typeface-merriweather": "0.0.54", "typeface-montserrat": "0.0.43", "typography": "^0.16.17" }, "devDependencies": { "babel-eslint": "^10.0.1", "eslint": "^5.12.0", "eslint-config-prettier": "^3.5.0", "eslint-config-standard": "^12.0.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-node": "^8.0.1", "eslint-plugin-prettier": "^3.0.1", "eslint-plugin-promise": "^4.0.1", "eslint-plugin-react": "^7.12.3", "eslint-plugin-standard": "^4.0.0", "prettier": "^1.14.2" }, "homepage": "https://blog.rayriffy.com", "keywords": [ "gatsby", "gatsbyjs", "react", "reactjs", "es6", "blog" ], "license": "MIT", "main": "n/a", "repository": { "type": "git", "url": "git+https://github.com/rayriffy/rayriffy-blog.git" }, "scripts": { "dev": "cross-env GATSBY_ENV=development gatsby develop --https", "dev-staging": "cross-env GATSBY_ENV=staging gatsby develop --https", "dev-prod": "cross-env GATSBY_ENV=production gatsby develop --https", "lint": "./node_modules/.bin/eslint --ext .js,.jsx --ignore-pattern public .", "test": "echo \"Error: no test specified\" && exit 1", "format": "prettier --trailing-comma es6 --no-semi --single-quote --write 'src/**/*.js' 'src/**/*.md'", "develop": "cross-env GATSBY_ENV=development gatsby develop --https", "start": "npm run develop", "build": "cross-env GATSBY_ENV=production gatsby build", "build-staging": "cross-env GATSBY_ENV=staging gatsby build", "deploy": "gatsby build --prefix-paths", "fix-semi": "eslint --quiet --ignore-pattern node_modules --ignore-pattern public --parser babel-eslint --no-eslintrc --rule '{\"semi\": [2, \"never\"], \"no-extra-semi\": [2]}' --fix gatsby-node.js" } }gatsby-node.js
Source
PS. I will drop repository here github.com/rayriffy/rayriffy-blog
It happens in Firefox as well. I think that bug is probably in that gatsby plugin. I've seen service workers use HTTP 2 for loading content before.
Hi Nick,
I just checked your site I believe you still haven't solve this, I am testing out some stuffs the
_headersandnetlify.toml. Will report back if that works!Did you ever figure this out?
Ignore me, I just spotted that lighthouse is due to be updated to solve this after mid-April
gatsbyjs.org/packages/gatsby-plugi... also exists
I use Netlify CMS with Gatsby. I believe that includes the
gatsby-plugin-netlifypackage? Either way, I guess I just need to configure it as per the docs?