I've just got this new ECS server and used web.py to return an HTML file from the server. IE and Edge can parse it normally and display the web page, but Chrome and my mobile phone fail to parse the HTML file. They only display the HTML file source code. Please help!
<!DOCTYPE HTML>
<html> <head> <!-- META TAGS --> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- STYLES --> <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href="css/fullpage.css" rel="stylesheet" type="text/css"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link href="css/custom.css" rel="stylesheet" type="text/css"> <!-- SITE TITLE --> <title>Merry Christmas!</title> </head> <body> <!-- AUDIO PLAYER --> <audio class="audio-player" autoplay loop> <source src="audio/song.mp3" type="audio/mpeg"> </audio> <!-- BACKGROUND CONTAINER --> <div class="bg-container snowy"> <!-- GLASS BALL --> <div class="glass-ball rotate"></div> <!-- TOP LIGHT --> <div class="top-light"></div> <!-- PAGE CONTENT --> <div class="page-content"> <div class="fullpage"> <!-- HOME SECTION --> <div id="home" class="section active"> <!-- TITLE --> <h1 class="snow-text">Merry Christmas!</h1> </div> </div> </div> </div> <!-- SCRIPTS --> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/countdown.min.js"></script> <script type="text/javascript" src="js/jquery.fullpage.min.js"></script> <script type="text/javascript" src="js/three.canvas.js"></script> <script type="text/javascript" src="js/snowy.js"></script> <script type="text/javascript" src="js/script.js"></script> <script type="text/javascript" src="js/custom.js"></script> </body> </html>
Rose
I would look into the dev tools settings and reset them all to standard and clear cache and memory in the browsers and try again. Are you transpiling everything before serving or in browser? A transpiler / polyfill like babel might help..
Ibrahim Tanyalcin
{intrst:"Scnc&Art",msc:"admin@MutaFrame",strive:"Experiment&Learn",loves:"ES5",hates:"bandwagon",lang:"Javascript",twttr:"@ibrhmTanyalcin"}
From your desktop (I guess there are ways to do it from the mobile too), see the response headers sent from the server. If you cannot see Content-type (case insensitive, if you see text/plain that's probably the reason), it might a good idea to add the header:
Content-Type: text/html; charset=utf-8