So, I can't use PHP due to ISAPI is not working together with some other ISAPI. Anyway, usually I can create index.php
, and header.php
then in index.php
I just use include().
But now, since the files has to use .htm extension, I wonder how I can include stuff from other file e.g: if I have say index.htm
and header.htm
and other.htm
header.htm looks like this
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0">
<meta name="description" content="">
<meta name="author" content="">
<title>Dashboard</title>
<!-- Bootstrap core CSS -->
<link href="css/customBootstrap/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/styles.css" rel="stylesheet">
<!-- Fonts -->
<link href="css/fa-4.0.3/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Muli' rel='stylesheet' type='text/css'>
<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<!-- Just for debugging purposes. Don't actually copy this line! -->
<!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- FontAwesome Fix for IE7 -->
<!-- [if IE 7]>
<link href="css/fa-3.2.1/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="css/fa-3.2.1/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
So I want in any other file, I dont have to copy the same thing on top (so I just need to change one file).
How should I do it? I tried something like this it work. But, it has like a split second delay (so, user will see a page without css for a split second, before it load properly.
<!DOCTYPE html>
<html lang="en">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(function(){
$("#header").load("../../common/header.htm");
});
</script>
<div id="header">
</div>
<body>
....
Any help?
Thank you