Kit Sunde Kit Sunde - 10 months ago 80
Javascript Question

Why isn't express-js setting the Content-Type header?

I have the following:

var express = require('express'),
app = express.createServer();

app.get("/offline.manifest", function(req, res){
res.end("CACHE MANIFEST");


The network tab in Chrome says it's
. Why isn't it setting the header?

The code above works, my problems were caused by a linking to an old version of express-js

Answer Source

res.type('json') works too now