I am a rookie. Recently, there is a weird thing happens to my site built on AWS. If I access it from my desktop, everything looks fine. However, when I switched to my mobile browser or other persons'= computers, it just displayed the source-code. Please save my ass from this annoying situation. Thanks in advance.
Try setting the Content-type
as a actual response header:
res.setHeader('Content-type', 'text/html; charset=utf-8');
The <meta http-equiv>
will only be parsed if the browser at least tries to read the file as text/html
. If it opts to skip such a trial, as at least a few seem to do, then it'll just print out the file as text/plain
.