473,625 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=marg in-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.appV ersion.indexOf( "Mac") != -1 ) {
/*Write to the Mac browser to the desired links.*/
document.write( '<div id="bottomBarWi thFooter3">' );
}
else {
document.write( '<div id="bottomBarWi thFooter2">' );
}
//-->

#bottomBarWithF ooter2 {
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="copyInfoFoo ter">© 1985-2008 Symark
International, Inc. All rights reserved. </div><a href="/sitemap.html"
class="footer15 n">Site Map</a><a href="/support/support.html"
class="footer15 n">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="copyInfoFoo ter">© 1985-2008 Symark International, Inc. All
rights reserved.</div>
<a href="/sitemap.html" class="footer15 n">Site Map</a><a href="/
support/support.html" class="footer15 n">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 1621
In our last episode,
<f3************ *************** *******@w39g200 0prb.googlegrou ps.com>, the
lovely and talented silverbob broadcast on
comp.infosystem s.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****@larseigh ner.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...@larseig hner.comwrote:
In our last episode,
<f3886e1a-8130-4411-a4aa-b8ca90fe6...@w3 9g2000prb.googl egroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystem s.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...@larseigh ner.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...@larseig hner.comwrote:
In our last episode,
<f3886e1a-8130-4411-a4aa-b8ca90fe6...@w3 9g2000prb.googl egroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystem s.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...@larseigh ner.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************ *************** *******@a21g200 0prf.googlegrou ps.com>, the
lovely and talented silverbob broadcast on
comp.infosystem s.www.authoring.html:
On Jul 31, 3:30 pm, Lars Eighner <use...@larseig hner.comwrote:
>In our last episode,
<f3886e1a-8130-4411-a4aa-b8ca90fe6...@w3 9g2000prb.googl egroups.com>, the
lovely and talented silverbob broadcast on
comp.infosyste ms.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...@larseigh ner.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****@larseigh ner.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********@new s.arcor-ip.de>,
the lovely and talented Hendrik Maryns
broadcast on comp.infosystem s.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****@larseigh ner.com
That was Zen; this is Tao.
Aug 1 '08 #7
On Jul 31, 4:55 pm, Lars Eighner <use...@larseig hner.comwrote:
In our last episode,
<03fc3a18-cdb8-44a0-92d9-978d816e2...@a2 1g2000prf.googl egroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystem s.www.authoring.html:
On Jul 31, 3:30 pm, Lars Eighner <use...@larseig hner.comwrote:
In our last episode,
<f3886e1a-8130-4411-a4aa-b8ca90fe6...@w3 9g2000prb.googl egroups.com>, the
lovely and talented silverbob broadcast on
comp.infosystem s.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...@larseigh ner.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...@larseigh ner.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************ *************** *******@t1g2000 pra.googlegroup s.com>, the
lovely and talented silverbob broadcast on
comp.infosystem s.www.authoring.html:
On Jul 31, 4:55 pm, Lars Eighner <use...@larseig hner.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****@larseigh ner.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

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

Similar topics

1
2785
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 clear property. Show the page in IE and highlight (using the mouse) some text in the blue box (include some line on the side of the gray box). Then click anywhere (out of the highlight zone). RESULT: some text lines (on the side of the gray...
0
1699
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 speed things up, and to avoid any problems with looking through the css file, I'll say first that I based the navigation menu on the "Suckerfish Dropdown menu" online demo over at htmldog. (http://www.htmldog.com/articles/suckerfish/dropdowns/). In...
4
1421
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). The two lines that confuse me are marked as (1) and (2). count=0; bool s(true);
11
1663
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 *ylist are ints or floats there is no apparent problem. If these variables are doubles, the program crashes. Furthermore, the crashes occur only when xlist and ylist are free()ed. When the above variables are doubles and the calls to free() are...
31
6612
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 variable becomes 364 and the other one becomes 365. Does anyone have any insight to what the problem is? Thanks in advance. Bjørn
3
1764
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 every 5 mins a check on the unused lifetime of all cached resources and frees them if they exceed their idle time limit. I made also a log object wich logs HTTP application level (triggered from global.asax) and web method level events (triggered
1
1504
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
3203
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: Whenever I declare the sockaddr_in structure inside the main, the debugger crashes at line X*, not being able to access argv parameters (see code below). It is very strange.. by only being there, sockaddr_in does not allow me to question argc...
20
2220
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 ----------------------------------- #include <stdio.h> int main (void) { char xx="abcd"; char * p1 = xx;
0
8182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8688
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8352
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6115
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.