Good day,
I hace used SSI in my website:
Libromania
All those includes were located within <body> section.
Now, I started with Google Analytics, also I want to change website title and also I want to add an icon to the title (favicon).
As all these changes are related to <head> section, I thought to put all in a new SSI.
I created an SSI and put it on server side. This is it:
<title>Libromanía</title>
<link rel="icon" href="/images/favicon.ico" />
<link rel="STYLESHEET" type="text/css" href="styles.css">
<script type="text/javascript">
<Google Analytics code>
</script>
Is there any limitation in terms of what can be included in a SSI file?
Webpage calling this include is not getting styles and favicon …
Thanks!!
<head> section now looks like this:
<head>
<!--#include virtual="head_spanish.html" -->
</head>
Good day,
I have used SSI in my website:
Libromania
All those includes were located within <body> section.
Now, I started with Google Analytics, I want to change website title and also I want to add an icon to the title (favicon).
As all these changes are related to <head> section, so I thought to put all in a new SSI.
I created an SSI and put it on server side. This is it:
<title>Libromanía</title>
<link rel=“icon” href=“/images/favicon.ico” />
<link rel=“STYLESHEET” type=“text/css” href=“styles.css”>
<script type=“text/javascript”>
<Google Analytics code>
</script>
The <head> section now looks like this:
<head>
<!–#include virtual=“head_spanish.html” –>
</head>
Question: Is there any limitation in terms of what can be included in a SSI file?
Webpage calling this include is not getting styles and favicon …
Thanks!!
Whatever is in the SSI include file is inserted in place of the include statement BEFORE the page is sent to the browser so the browser has no knowledge that an SSI include was used in the first place.
Thanks felgall,
what I have to understand is there is no way to use SSI within <head> section?
If yes, is there any other alternative?
Thanks!!
You can use server side includes to replace any (or even all) of the web page source. The following would be a valid web page (just as long as the files between them contain everything needed to create a valid web page):
<!–#include virtual=“doctype.html” –>
<!–#include virtual=“headp1.html” –>
<!–#include virtual=“body1.html” –>
ok, thanks a lot!!
This is how it looks now:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
“http://www.w3.org/TR/html4/strict.dtd”
>
<html lang=“en”>
<head>
<!–#include virtual=“head_english.html” –>
</head>
<body>
<div id=“container”>
<!–#include virtual=“header_english.html” –>
<!–#include virtual=“menu_english.html” –>
next is code particular for this page.
And within SSI for head I put: title, keywords, description, favicon, CSS stylesheet, java script Google Analytics.
Thanks!