diff --git a/lib/proxies/dom.js b/lib/proxies/dom.js
index <HASH>..<HASH> 100644
--- a/lib/proxies/dom.js
+++ b/lib/proxies/dom.js
@@ -192,10 +192,12 @@ function DomProxy(raja, opts) {
 		var h = this;
 		raja.retrieve(inst.user.url, req, function(err, resource) {
 			if (err) return cb(err);
-			if (!resource) resource = raja.create(inst.user, req).save();
+			if (!resource) resource = raja.create(inst.user, res);
 			inst.user = resource;
 			if (!resource.headers) resource.headers = {};
+			resource.headers['Content-Type'] = 'text/html';
 			if (!resource.resources) resource.resources = {};
+			resource.save();
 			if (inst.page && inst.live && !inst.reloads) {
 				inst.page.locked = true;
 				inst.output(inst.page, function(err, str) {
@@ -219,7 +221,6 @@ function DomProxy(raja, opts) {
 				if (!resource.itime || resource.itime <= resource.mtime) {
 					resource.valid = true;
 					resource.mtime = new Date();
-					resource.headers['Content-Type'] = 'text/html';
 					resource.save();
 				} else if (!resource.mtime) {
 					resource.mtime = new Date();
Make sure Content-Type is set when building key in dom proxy