NodeJS/express: Cache and 304 status code

前端 未结 5 1770
迷失自我
迷失自我 2020-11-30 18:41

When I reload a website made with express, I get a blank page with Safari (not with Chrome) because the NodeJS server sends me a 304 status code.

How to solv

5条回答
  •  被撕碎了的回忆
    2020-11-30 19:33

    Try using private browsing in Safari or deleting your entire cache/cookies.

    I've had some similar issues using chrome when the browser thought it had the website in its cache but actually had not.

    The part of the http request that makes the server respond a 304 is the etag. Seems like Safari is sending the right etag without having the corresponding cache.

提交回复
热议问题