Node Static Resource Server has Cache-Control set, but the browser never goes 304

  node.js, question

I use node as a static resource server and return an ordinary png picture.
Now I have set up Cecha-Control for this response, hoping that the browser can cache it. But every time I refresh the page, I return 200 and request resources from the server. How should I set up the browser cache to use?

The following is the node side code:

const fs = require('fs')
 const http = require('http')
 const url = require('url')
 const server = http.createServer((req, res) => {
 let pathname = url.parse(req.url).pathname
 Let realPath = 'assets' plus pathname
 fs.readFile(realPath, "binary", function(err, file) {
 if (err) {
 res.writeHead(500, {'Content-Type': 'text/plain'})
 } else {
 res.writeHead(200, {
 'Access-Control-Allow-Origin': '*',
 'Content-Type': 'image/png',
 'ETag': "666666",
 'Cache-Control': 'max-age=31536000, public',
 'Expires': 'Mon, 07 Sep 2026 09:32:27 GMT'
 res.write(file, "binary")
 console.log('Listening on port: 80')

Request header information:

  1. Did you brush it hard?

  2. The console has disable cache, right