473,836 Members | 1,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help putting standard headers on all pages

I've been looking for references for some weeks now, but haven't found
an answer to the following question. I'd love some help on this:

*Without* using JavaScript or other active client-side scripting,
server-side includes or frames, is there a way to include a standard
header on all pages within a site? The design goal is to have the
header links and title graphic on every page kept in some single
place, so that a change to the header data doesn't require changing
every single html file on the site. (The sites in question are my
personal sites - see signature).

In other words, I want a way to do this in regular (non-framed) non-
active HTML and CSS only. It seems like there ought to be a way to do
it with CSS, but I really can't work it out.

Thanks for any pointers...

--
Lewin A.R.W. Edwards
Projects - http://www.zws.com/
Personal - http://www.larwe.com/

Sep 21 '08
68 4756
zw*******@gmail .com writes:
On Sep 21, 7:27Â*am, "Jukka K. Korpela" <jkorp...@cs.tu t.fiwrote:
<snip>
>How often do you intend to change the common header? Â*Monthly? Weekly? Well,

The idea is to put a "new this week" type of link there, for example a
thumbnail picture of progress on one of my projects.
Do you think that putting such a link in the common header will mean
that common header changes weekly? If so, you need to re-think how
your links are written.

--
Ben.
Sep 21 '08 #21
On Sep 21, 8:56*am, Ben Bacarisse <ben.use...@bsb .me.ukwrote:
Hmm... I didn't include that in the list because it's not the design
goal - I don't want to have to re-upload every single HTML file.

That does not follow unless you change the common parts. *A good build
systems just uploads the parts that change.
Which in this case would be every .html file on the entire site,
because as you'll see if you visit those sites, they all have exactly
the same header (currently implemented with tables).

Roughly once every year I grit my teeth and rewrite every single file
on the site. I am getting to this point right now, but not looking
forward to it.
don't know if it's my hosting provider (Verve) or something else, but
I frequently get dropped/stalled connections.

You also say that SSI imposes a large cost on your hosting provider.
If the upload problems are also their fault, you should change
provider (for me, just one of these would be enough).
I'm really not sure where the problem lies with ftp sessions. It might
partly be the fault of my cable provider; I have pretty crappy
upstream data rates. (At home I run an Apache server to collect data
from some embedded devices, using dyndns to keep it visible - larwe
dot ath dot cx - you can poke it and see it is really slow because it
relies on the same upstream connection).

Currently I pay $15/month for 1Gb space, 5Gb/month transfers,
unlimited subdomains and addon domains and various other features.
Last time my wife and I tried a different provider, it was a disaster
- on paper it looked like a good deal but it went up and down every
other week, no support, etc. So we are leery about experiments with
other providers :)
What is inelegant about a good build system?
A system that has to re-upload every file looks pretty inelegant to
me.
Your perfect time to learn Perl (or at least one use of it)! *Perl has
yeah - I knew someone would suggest this :) perl is just one of those
languages, like APL, which looks daunting to an asm/C/C++/[rarely]
Java guy. I'm an embedded systems developer, not an app-level person.
It's much less work to me to hack up a quick one-page C program to do
the one function I need than it would be to learn perl. I realize this
would be different if I intended to add CGI to the site, but since I
have no intention of *ever* running any scripts on the server side,
there doesn't seem to be any compelling reason to learn perl.
I was hoping to be able to have a
"news of the week" or "news of the day" item in this header, i.e.

I don't see why "everything " needs to be re-written. *A build system
will change just those files that need to be changed and no others. *A
What I don't see is why you don't appreciate that this is every
single .html on my site. Counting all three sites I administer, this
is just over 1100 files.
Sep 21 '08 #22
On Sep 21, 9:05*am, Ben Bacarisse <ben.use...@bsb .me.ukwrote:
The idea is to put a "new this week" type of link there, for example a
thumbnail picture of progress on one of my projects.

Do you think that putting such a link in the common header will mean
that common header changes weekly? *If so, you need to re-think how
your links are written.
<frustrationWha t am I not making clear here? Look at www.zws.com,
specifically the logo and links above the cyan separator bar. I intend
to move all that logo/link material into this "unified header scheme",
and I also intend to add some "news of the day/week/month/whatever"
link(s) as well, for example a link to whatever article I have
published most recently, special pricing on one of my books, a once-in-
a-lifetime opportunity to buy one of my used socks on eBay, whatever.

The point being that no matter where people enter the site, they will
see in the header a link to whatever I think is of most interest
today. That could update every couple of days in the worst case. I
don't want to upload every single HTML file every time this happens -
life's too short. I already mentioned the other technical constraints
I'm trying to apply to select a technology for this function.

Sep 21 '08 #23
zw*******@gmail .com writes:
On Sep 21, 1:46Â*am, Guy Macon <http://www.GuyMacon.co m/wrote:
<snip>
>BTW, what do you have against server-side includes?

They cause a perceptible page load time hit on my provider, and at one
time (maybe still, buried in the FAQs somewhere) the provider
explicitly advised against using server-side processing "just" to
serve up a standardized banner on every page of the site. IIRC they
recommended including a javascript file that does a bunch of
document.write( )s to generate the menu text, and invoking the
appropriate function inside the HTML file.
Fortunately you have done the decent thing an named them (else where)
so we all know another name to avoid. Thanks for that.

However I am baffled and don't want to malign them without more
detailed knowledge. If you mean vervehosting.co m, their cheapest
package includes PHP and the knowledge base of the site tells you how
to turn SSI on for all files as if it were the most normal thing in
the world. They don't seem to discourage it at all. Maybe that is
only in the "client area". A link would help, because on the surface
they look quite good.

--
Ben.
Sep 21 '08 #24
On Sep 20, 11:51*pm, dorayme <doraymeRidT... @optusnet.com.a uwrote:
Sounds to me like you might need to get a different host or (for a small
fee) I could ask my dark sunglass team of men to pay them a little visit
and advise them not to be giving you so much trouble.
Heh. I think it is not malicious so much as the fact that I'm not
paying (nor willing to pay) for premium services - so my pages are
hosted on a virtual server without much horsepower.

Sep 21 '08 #25
zw*******@gmail .com writes:
On Sep 21, 9:05Â*am, Ben Bacarisse <ben.use...@bsb .me.ukwrote:
The idea is to put a "new this week" type of link there, for example a
thumbnail picture of progress on one of my projects.

Do you think that putting such a link in the common header will mean
that common header changes weekly? Â*If so, you need to re-think how
your links are written.

<frustrationWha t am I not making clear here? Look at www.zws.com,
specifically the logo and links above the cyan separator bar. I intend
to move all that logo/link material into this "unified header scheme",
and I also intend to add some "news of the day/week/month/whatever"
link(s) as well, for example a link to whatever article I have
published most recently, special pricing on one of my books, a once-in-
a-lifetime opportunity to buy one of my used socks on eBay,
whatever.

The point being that no matter where people enter the site, they will
see in the header a link to whatever I think is of most interest
today. That could update every couple of days in the worst case. I
don't want to upload every single HTML file every time this happens -
life's too short. I already mentioned the other technical constraints
I'm trying to apply to select a technology for this function.
If your links have to change every day or so then, of course, so would
every built page. Most sites can get away with links that don't
change even though the content does. If you can't (or don't want to)
do that then you would, indeed, have to do lots of uploads.

If you want lots of very specific and ever changing links, then this
does not really fit the model of a common header. I'd be inclined to
have one link that never changes ("what's new") and have that page
include the link to your socks on ebay. This is one example or what I
meant by rethinking how your links works.

--
Ben.
Sep 21 '08 #26
On 21 Sep, 13:18, zwsdot...@gmail .com wrote:
On Sep 21, 2:09 am, Guy Macon <http://www.GuyMacon.co m/wrote:
>I don't want to use SSIs because they severely impact performance on
>my provider.
And they let you use CSS? I wouldn't be surprised if processing
your CSS results in more use of server resources than a simple
header-replace SSI would.

What does CSS do on the server side?
Nothing more than an SSI.
My understanding is that they're
rendered entirely at the client end.
The same is true for an SSI.
The HTML file references the
stylesheet, and the browser loads it. No server-side processing.
With an SSI, you don't have an http request. The "processing "
performance impact is marginal. I don't know why you're mentioning it
at all. The syntax is simple an not proprietary/provider-specific.
It's far better than an object/iframe or anything else that requires
an http request.
Sep 21 '08 #27
zw*******@gmail .com wrote:
I did some googling on problems with IFRAMEs, and I can't see any
show- stoppers, care to explain why it is a problem?
I guess people who understand the problems don't care about writing about
them much. Checking my dusty piles of pages, I found
http://www.cs.tut.fi/~jkorpela/html/iframe.html
which is fairly old but might contain some observations that are still
relevant.

Just a point I have probably not addressed there: You should use the same
character encoding in the iframed document as in the containing document.
This is due to errors in popular browsers: they cannot handle a mixture.
This is not an obstacle as such, just something to take care of - and
strikingly often ignored.

If you start implementing the idea of an iframed header part, you will
encounter some nasty formatting problems. For example, would you set the
height of iframe in pixels, or how? If it contains both text and images,
you're in trouble: you should use the em unit for sizing text boxes and px
unit for images, and you can't combine them in a value of a property in CSS
(still less in HTML, of course).
As near as I can
work out it is exactly the kind of client-side #include feature I
want;
No, it is logically quite different - it creates a subwindow where an
external document is displayed independently, instead of really _including_
its content in the document's content flow.
The idea is to put a "new this week" type of link there, for example a
thumbnail picture of progress on one of my projects.
Well then I don't really see why you want to create a problem, instead of
using a page template that has an element for such a link, say
<div class="new">
<a href="new.html" ><img src="new.jpg" alt="New this week" width="200"
height="100"></a>
</div>
(properly styled of course)
and you just change the content of the image new.jpg and the page new.html.

If you want to include text as well (or a more suitable alt="..." text),
then you are in the area where you should really use some of the different
non-HTML techniques for inclusion, e.g. some of those mentioned in this
discussion. For example, SSI has some efficiency impact, but it is hardly
noticeable unless you have a _very, very_ popular site.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Sep 21 '08 #28
On Sep 21, 10:48*am, "Jukka K. Korpela" <jkorp...@cs.tu t.fiwrote:
them much. Checking my dusty piles of pages, I foundhttp://www.cs.tut.fi/~jkorpela/html/iframe.html
which is fairly old but might contain some observations that are still
relevant.
Grr. I built a test layout based on iframes, and it looks fairly nice,
but of course breaks at narrow window sizes because there is no neat
way to auto-size an iframe to the height of the content within it. I
don't know if I can live with it or not. My current layout breaks at
small sizes too, but not as badly - at least everything still remains
accessible. Anything that scrolls outside visibility inside a fixed-
size iframe with no scrollbars might as well not be there.

So I start to take another look at SSIs and I now remember the other
reason I don't like them - I can't preview them without slowly
uploading them to my server. What a pain. This particular need - as
shown by Google searches - is not unique.

Sep 21 '08 #29
Sun, 21 Sep 2008 14:27:28 +0300 from Jukka K. Korpela
<jk******@cs.tu t.fi>:
No amount of reduction in site management work (like moving from manually
maintained headers to iframed header file) could ever justify all the
problems you create by using IFRAME.
My situation is not common headers, which indeed I handle by
preprocessing, but common *page content* in two different sites with
different structures.

Here's a sample URL:
http://oakroadsystems.com/math/tiskurt.htm

The actual content (inside the IFRAME) is at my college's Web site:
http://www.tc3.edu/instruct/sbrown/ti83/skurt.htm

There may be a better way to accomplish what I'm trying to do, which
is to make the content available through my Web site and through the
College Web site, without duplicate uploading all the content. (There
are several dozen instructional pages like this, and the average page
is updates maybe two or three times a year.) Suggestions?

Notce that just above the IFRAME I do give a link for busting out of
the frame.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Sep 21 '08 #30

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

Similar topics

12
1535
by: xxx | last post by:
I'm having a little trouble understanding why a derivative class cannot access a protected member of the base class in the following code: #include <stdio.h> class CBase { protected: int x;
8
5484
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
37
2513
by: John Salerno | last post by:
I contacted my domain host about how Python is implemented on their server, and got this response: ------------------- Hello John, Please be informed that the implementation of python in our server is through mod_python integration with the apache. These are the steps needed for you to be able to run .py script directly
41
2722
by: c | last post by:
Hi every one, Me and my Cousin were talking about C and C#, I love C and he loves C#..and were talking C is ...blah blah...C# is Blah Blah ...etc and then we decided to write a program that will calculate the factorial of 10, 10 millions time and print the reusult in a file with the name log.txt.. I wrote something like this
4
6349
by: mattehz | last post by:
Hey there, I am trying to upload old source files and came across these errors: Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_html.php on line 59 Notice: Undefined index: args in /home/mattehz/public_html/acssr/trunk/inc_error.php on line 92 Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_error.php on line 92
0
9826
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10860
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
10560
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...
0
10261
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
9389
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
7796
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...
0
5831
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4466
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3116
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.