seems better if you use Content-Type header in node/express #1053
grahampcharles
started this conversation in
Ideas / Requests
Replies: 1 comment
-
Thanks for sharing! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is super-minor but I thought I'd drop it here in case anyone else searches up the issue in the future. The node/express demos on RunKit (like this one) indicate that browsers will correctly detect
Content-Type
from the file extension. Here's the relevant code from that example:For whatever reason, Chrome 91 -- at least on my machine -- kind of chokes on that. It drops the document correctly, but the browser returns a home page window with the viewport scaled to like 300%. Interestingly, some keyboard shortcuts (like Zoom and Show/Hide Toolbar) are also disabled.
Anyway, I'm sure it's all Chrome's fault, but it seems safer to just send the explicit header.
Chrome deals with that correctly.
Beta Was this translation helpful? Give feedback.
All reactions