Fix document.contentType is not a standard, it doesn't work except Firefox.