473,396 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Strange behavior with Service Side Include

I am replacing my Javascript-called files with SSI, and I'm getting an
unexpected result with my page footer. I can really use some help
with this.

The footer contains a copyright (left justified), and page links
(right justfied) all on the same line. After changing to SSI, the
right side links are correct, but the left side copyright looks to be
wrapping to the next line. I can fix this in IE by moving it back up
in line with the links with a "style=margin-top:-10px", but that
creates undesired results in Firefox.

Here are the details:

First, there is a script that writes a horizontal line and sets up
some stuff:

//<!--
/*Determine if the browser is a Mac browser.*/
if (navigator.appVersion.indexOf("Mac") != -1 ) {
/*Write to the Mac browser to the desired links.*/
document.write('<div id="bottomBarWithFooter3">' );
}
else {
document.write('<div id="bottomBarWithFooter2">' );
}
//-->

#bottomBarWithFooter2 {
width: 980px;
border-top: 1px solid #ced2d5;
border-bottom: 0px solid #7aff0f;
margin-top: -20px;
background-color: #ffffff;
font-size: 9px;
font-family: Verdana;
color: #003875;
font-weight: bold;
text-align: right;
padding-top: 0px;
}
Then my footer. These are the changes:

From this:

<script type="text/javascript" src="/footer.txt"></script>

(contents of footer.txt)
document.write('<div id="copyInfoFooter">© 1985-2008 Symark
International, Inc. All rights reserved. </div><a href="/sitemap.html"
class="footer15n">Site Map</a><a href="/support/support.html"
class="footer15n">Contact Us</a><a href="/company/privacy.html"
class="footer15">Privacy Policy/ California Privacy Rights</a><a
href="/index.html" class="footern">Home</a>')

#copyInfoFooter {
float: left;
color: #7c7c7c;
font-weight: normal;
text-decoration: none;
font-family: Verdana;
color: #003875;
font-weight: bold;
text-align: right;
padding-top: 0px;
}
To this:

<!--#include virtual="/includes/footer.html" -->

(contents of SSI file footer.html)
<div id="copyInfoFooter">© 1985-2008 Symark International, Inc. All
rights reserved.</div>
<a href="/sitemap.html" class="footer15n">Site Map</a><a href="/
support/support.html" class="footer15n">Contact
Us</a><a href="/company/privacy.html" class="footer15">Privacy Policy/
California Privacy
Rights</a><a href="/index.html" class="footern">Home</a>
Jul 31 '08 #1
10 1606
In our last episode,
<f3**********************************@w39g2000prb. googlegroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystems.www.authoring.html:
I am replacing my Javascript-called files with SSI, and I'm getting an
unexpected result with my page footer. I can really use some help
with this.
I went to the Symark site, and poking around a little, I did not find this
exact footer. Nonetheless, let us reason together. It cannot possibly be
that you use SSI, because SSI is seamless to the browser. It must be that
the SSI text is not *exactly* like the previous script generated text.

You can copy and paste the SSI text into a test document to prove that
SSI is not at fault (which is theoretically impossible anyway, but some
people still need proof that water is wet). So then you have to compare the
served SSI document (i.e. view source) with the script generated source
until you discover what is different.

In particular, some versions of IE are known to not handle some whitespace
(especially newlines) between tags properly. You must make the SSI agree
*exactly* with the script generated text --- including spaces and newlines,
even where they shouldn't count --- to expect consistent results in IE.
A quick examination reveals that the SSI text is not exactly the same
as the script text in reguard to spaces and newlines.

--
Lars Eighner <http://larseighner.com/us****@larseighner.com
War on Terrorism: Bad News from the Sanity Front
"There's one thing ... that I do like about Rumsfeld, he's just a little bit
crazy, OK"? --Thomas Friedman, _The New York Times_
Jul 31 '08 #2
On Jul 31, 3:30 pm, Lars Eighner <use...@larseighner.comwrote:
In our last episode,
<f3886e1a-8130-4411-a4aa-b8ca90fe6...@w39g2000prb.googlegroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystems.www.authoring.html:
I am replacing my Javascript-called files with SSI, and I'm getting an
unexpected result with my page footer. I can really use some help
with this.

I went to the Symark site, and poking around a little, I did not find this
exact footer. Nonetheless, let us reason together. It cannot possibly be
that you use SSI, because SSI is seamless to the browser. It must be that
the SSI text is not *exactly* like the previous script generated text.

You can copy and paste the SSI text into a test document to prove that
SSI is not at fault (which is theoretically impossible anyway, but some
people still need proof that water is wet). So then you have to compare the
served SSI document (i.e. view source) with the script generated source
until you discover what is different.

In particular, some versions of IE are known to not handle some whitespace
(especially newlines) between tags properly. You must make the SSI agree
*exactly* with the script generated text --- including spaces and newlines,
even where they shouldn't count --- to expect consistent results in IE.
A quick examination reveals that the SSI text is not exactly the same
as the script text in reguard to spaces and newlines.

--
Lars Eighner <http://larseighner.com/use...@larseighner.com
War on Terrorism: Bad News from the Sanity Front
"There's one thing ... that I do like about Rumsfeld, he's just a little bit
crazy, OK"? --Thomas Friedman, _The New York Times_

I just reformatted the HTML so that it is exactly like the javascript
text file (minus the "document.write"). It made no difference as I
would expect because HTML does not care how its formatted.

Then, I replaced the SSI call with the exact code being used in the
SSI file, and the footers display differently. Take a look:
http://www.symark.com/test6.html (This is the SSI version)
http://www.symark.com/test7.html (This is the same SSI HTML but
embedded in the page)

Remember. This is in IE.

BTW, when I view the page source, I see a little dot or something
preceding the SSI inserted code. Is this typical?

Regards, Bob
Jul 31 '08 #3
On Jul 31, 3:30 pm, Lars Eighner <use...@larseighner.comwrote:
In our last episode,
<f3886e1a-8130-4411-a4aa-b8ca90fe6...@w39g2000prb.googlegroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystems.www.authoring.html:
I am replacing my Javascript-called files with SSI, and I'm getting an
unexpected result with my page footer. I can really use some help
with this.

I went to the Symark site, and poking around a little, I did not find this
exact footer. Nonetheless, let us reason together. It cannot possibly be
that you use SSI, because SSI is seamless to the browser. It must be that
the SSI text is not *exactly* like the previous script generated text.

You can copy and paste the SSI text into a test document to prove that
SSI is not at fault (which is theoretically impossible anyway, but some
people still need proof that water is wet). So then you have to compare the
served SSI document (i.e. view source) with the script generated source
until you discover what is different.

In particular, some versions of IE are known to not handle some whitespace
(especially newlines) between tags properly. You must make the SSI agree
*exactly* with the script generated text --- including spaces and newlines,
even where they shouldn't count --- to expect consistent results in IE.
A quick examination reveals that the SSI text is not exactly the same
as the script text in reguard to spaces and newlines.

--
Lars Eighner <http://larseighner.com/use...@larseighner.com
War on Terrorism: Bad News from the Sanity Front
"There's one thing ... that I do like about Rumsfeld, he's just a little bit
crazy, OK"? --Thomas Friedman, _The New York Times_


This little dot I spoke of seems to be the source of my problem. You
can see it when you do a view source from IE, but it doesn't appear in
the source from Firefox.

- Bob
Jul 31 '08 #4
In our last episode,
<03**********************************@a21g2000prf. googlegroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystems.www.authoring.html:
On Jul 31, 3:30 pm, Lars Eighner <use...@larseighner.comwrote:
>In our last episode,
<f3886e1a-8130-4411-a4aa-b8ca90fe6...@w39g2000prb.googlegroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystems.www.authoring.html:
I am replacing my Javascript-called files with SSI, and I'm getting an
unexpected result with my page footer. I can really use some help
with this.

I went to the Symark site, and poking around a little, I did not find this
exact footer. Nonetheless, let us reason together. It cannot possibly be
that you use SSI, because SSI is seamless to the browser. It must be that
the SSI text is not *exactly* like the previous script generated text.

You can copy and paste the SSI text into a test document to prove that
SSI is not at fault (which is theoretically impossible anyway, but some
people still need proof that water is wet). So then you have to compare the
served SSI document (i.e. view source) with the script generated source
until you discover what is different.

In particular, some versions of IE are known to not handle some whitespace
(especially newlines) between tags properly. You must make the SSI agree
*exactly* with the script generated text --- including spaces and newlines,
even where they shouldn't count --- to expect consistent results in IE.
A quick examination reveals that the SSI text is not exactly the same
as the script text in reguard to spaces and newlines.

--
Lars Eighner <http://larseighner.com/use...@larseighner.com
War on Terrorism: Bad News from the Sanity Front
"There's one thing ... that I do like about Rumsfeld, he's just a little bit
crazy, OK"? --Thomas Friedman, _The New York Times_
I just reformatted the HTML so that it is exactly like the javascript
text file (minus the "document.write"). It made no difference as I
would expect because HTML does not care how its formatted.
Then, I replaced the SSI call with the exact code being used in the
SSI file, and the footers display differently. Take a look:
http://www.symark.com/test6.html (This is the SSI version)
http://www.symark.com/test7.html (This is the same SSI HTML but
embedded in the page)
Remember. This is in IE.
BTW, when I view the page source, I see a little dot or something
preceding the SSI inserted code. Is this typical?
No. SSI is seamless to client. However there are/is some nonsense
characters after an few more tabs (than in test7). However the same
characters appear in several other places, so I assume it is some utf-8
dingbat, intentional or otherwise. Anyway, this appears to be the only
utf-8 that is in the document. Is it being served as utf-8? (and you do
know that meta http-equiv is useless, don't you? -- well, not entirely
useless, but has no effect whatever on how the document is served.)
Is the text for the SSI being saved as utf-8?

--
Lars Eighner <http://larseighner.com/us****@larseighner.com
War hath no fury like a noncombatant.
- Charles Edward Montague
Aug 1 '08 #5
Op 01-08-08 01:55 heeft Lars Eighner als volgt van zich laten horen:
Is it being served as utf-8? (and you do
know that meta http-equiv is useless, don't you? -- well, not entirely
useless, but has no effect whatever on how the document is served.)
No, I didn’t know that, mind pointing me to an explanation?

Cheers, H.
Aug 1 '08 #6
In our last episode,
<48********@news.arcor-ip.de>,
the lovely and talented Hendrik Maryns
broadcast on comp.infosystems.www.authoring.html:
Op 01-08-08 01:55 heeft Lars Eighner als volgt van zich laten horen:
>Is it being served as utf-8? (and you do
know that meta http-equiv is useless, don't you? -- well, not entirely
useless, but has no effect whatever on how the document is served.)
No, I didn?t know that, mind pointing me to an explanation?
I don't know what you mean by an explanation. The meta http-equiv
tag is useless for determining how a document is served by a server.
The server does not get any information from it, and when the document
comes from a server, neither does the client. It is supposed to help
a client when reading the document as a file (no server involved) by
supplying information that the server would supply if the document were
served. You can't change a served document's mime type or character set
with meta http-equiv because when the document is served that information
is in the http headers, and by the time the meta tag is sent, that ship has
sailed.

--
Lars Eighner <http://larseighner.com/us****@larseighner.com
That was Zen; this is Tao.
Aug 1 '08 #7
On Jul 31, 4:55 pm, Lars Eighner <use...@larseighner.comwrote:
In our last episode,
<03fc3a18-cdb8-44a0-92d9-978d816e2...@a21g2000prf.googlegroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystems.www.authoring.html:
On Jul 31, 3:30 pm, Lars Eighner <use...@larseighner.comwrote:
In our last episode,
<f3886e1a-8130-4411-a4aa-b8ca90fe6...@w39g2000prb.googlegroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystems.www.authoring.html:
I am replacing my Javascript-called files with SSI, and I'm getting an
unexpected result with my page footer. I can really use some help
with this.
I went to the Symark site, and poking around a little, I did not find this
exact footer. Nonetheless, let us reason together. It cannot possibly be
that you use SSI, because SSI is seamless to the browser. It must be that
the SSI text is not *exactly* like the previous script generated text.
You can copy and paste the SSI text into a test document to prove that
SSI is not at fault (which is theoretically impossible anyway, but some
people still need proof that water is wet). So then you have to compare the
served SSI document (i.e. view source) with the script generated source
until you discover what is different.
In particular, some versions of IE are known to not handle some whitespace
(especially newlines) between tags properly. You must make the SSI agree
*exactly* with the script generated text --- including spaces and newlines,
even where they shouldn't count --- to expect consistent results in IE.
A quick examination reveals that the SSI text is not exactly the same
as the script text in reguard to spaces and newlines.
--
Lars Eighner <http://larseighner.com/use...@larseighner.com
War on Terrorism: Bad News from the Sanity Front
"There's one thing ... that I do like about Rumsfeld, he's just a little bit
crazy, OK"? --Thomas Friedman, _The New York Times_
I just reformatted the HTML so that it is exactly like the javascript
text file (minus the "document.write"). It made no difference as I
would expect because HTML does not care how its formatted.
Then, I replaced the SSI call with the exact code being used in the
SSI file, and the footers display differently. Take a look:
http://www.symark.com/test6.html(This is the SSI version)
http://www.symark.com/test7.html(This is the same SSI HTML but
embedded in the page)
Remember. This is in IE.
BTW, when I view the page source, I see a little dot or something
preceding the SSI inserted code. Is this typical?

No. SSI is seamless to client. However there are/is some nonsense
characters after an few more tabs (than in test7). However the same
characters appear in several other places, so I assume it is some utf-8
dingbat, intentional or otherwise. Anyway, this appears to be the only
utf-8 that is in the document. Is it being served as utf-8? (and you do
know that meta http-equiv is useless, don't you? -- well, not entirely
useless, but has no effect whatever on how the document is served.)
Is the text for the SSI being saved as utf-8?

--
Lars Eighner <http://larseighner.com/use...@larseighner.com
War hath no fury like a noncombatant.
- Charles Edward Montague
I don't want this thread to take off in a new direction, but to
address the meta http-equiv issue, when I save the document as HTML
encoding UTF-8 in my editor (MS Expression Web), it puts <meta http-
equiv="Content-Type" content="text/html; charset=utf-8"in the <head>
area.

- Bob
Aug 1 '08 #8
In our last episode,
<c2**********************************@t1g2000pra.g ooglegroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystems.www.authoring.html:
On Jul 31, 4:55 pm, Lars Eighner <use...@larseighner.comwrote:
>Is it being served as utf-8? (and you do
know that meta http-equiv is useless, don't you? -- well, not entirely
useless, but has no effect whatever on how the document is served.)
Is the text for the SSI being saved as utf-8?
I don't want this thread to take off in a new direction, but to
address the meta http-equiv issue, when I save the document as HTML
encoding UTF-8 in my editor (MS Expression Web), it puts <meta http-
equiv="Content-Type" content="text/html; charset=utf-8"in the <head>
area.
The meta http-equiv tag is harmless and may be helpful when the document is
viewed as a file. But it is useless when the document is served. The harm
is that the meta tag might mislead you to think it is enough for a served
document. It isn't. If you don't know the defaults for your server for
sure, you need to AddType *and* AddCharset in your .htaccess .

As I have said elsewhere, the mime type and charset need to be in the http
headers and by the time the meta tag is sent that ship has sailed.

--
Lars Eighner <http://larseighner.com/us****@larseighner.com
If it wasn't for muscle spasms, I wouldn't get any exercise at all.
Aug 1 '08 #9


I finally found a simple solution. This page described my issue,
http://www.w3.org/International/questions/qa-utf8-bom.
By opening my include files in Notepad, changing the encoding from
UTF-8 to ANSI, and resaving, I was able to eliminate the problem.

- Bob
Aug 1 '08 #10
silverbob <bs**********@symark.comwrites:
I finally found a simple solution. This page described my issue,
http://www.w3.org/International/questions/qa-utf8-bom.
By opening my include files in Notepad, changing the encoding from
UTF-8 to ANSI, and resaving, I was able to eliminate the problem.
Our posts crossed. Before I noticed you'd removed the U+FEFFs I was
going to say that they are often added by Windows programs to indicate
a Unicode file (they have a particular role in UTF-16 files, but any
Unicode encoding can have them added).

--
Ben.
Aug 1 '08 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Luigi | last post by:
I noted a particular behavior shown by IE. Look at the simple page attached at the bottom of the post. In it, there is a box floated with the float property and another box that jumps it with the...
0
by: thulsey | last post by:
Hi all, I've got some strange behavior happening in Firefox and Safari (Khtml and Gecko) that displays *almost* fine in IE6.0 (still trying to get pixels to line up, anal anal anal...) To...
4
by: hall | last post by:
Hi. I've come across someting strange. I was trying to make a for-loop execute repetadly until the function called inside it does not return true during the entire loop (see program below). ...
11
by: Marlene Stebbins | last post by:
Something very strange is going on here. I don't know if it's a C problem or an implementation problem. The program reads data from a file and loads it into two arrays. When xy, x, y, *xlist and...
31
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one...
3
by: AinO | last post by:
Hi, - I've created a webservice in VS2003/c# wich relies heavily on cache. It has a cache manager wich loads resources (triggered by requests) and wich has also a built in timer wich triggers...
1
by: Alexander Inochkin | last post by:
Hi! I found same strange behavior of ASP.NET. It is possible this is the bug. Follow the steps:
8
by: FBM | last post by:
Hi there, I am puzzled with the behavior of my code.. I am working on a networking stuff, and debugging with eclipse (GNU gdb 6.6-debian).. The problem I am experiencing is the following: ...
20
by: Pilcrow | last post by:
This behavior seems very strange to me, but I imagine that someone will be able to 'explain' it in terms of the famous C standard. -------------------- code -----------------------------------...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.