A Beginners Guide to Server Side Includes



Get Web Design Tips and Tricks on mps-web-design.com. A Beginners Guide to Server Side Includes topic will increase your understanding on Web Design Tips and Tricks. We at mps-web-design.com only provide news, articles, information in Web Design Tips and Tricks. Web Design Tips and Tricks at mps-web-design.com provides the most up to date news and articles. If you have questions please do not hesitate to contact us.

An Introduction to Server Side Includes


Beginner? That's OK!


While much has been written about Server Side Includes (SSIs -also known as Virtual Includes) much of this information is designed for intermediate to advanced webmasters. This article is aimed at beginners. It is assumed that the reader has no prior knowledge of scripting languages, servers, or any other advanced computer skills. This article will introduce the reader to SSIs and explain how they are used in web site development. SSIs are guaranteed to save you time as your web site develops and changes over time.

Servers: just a place for your stuff?


It is important to understand that all the code for your website is stored remotely on a computer called a server. On a very basic level, the server (remote computer) is just a place where you can store the files on the 'net.' These files would typically contain your web site's HTML code and possibly some files containing pictures or graphics.
For example, a very simple web site might consist of 5 web pages with five corresponding files that are stored on the server. One file is named index.html and we will have four additional files. These files might be named about-me.html , education.html , resume.html , and portfolio.html. We'll say that this simple 5 page web site is run by a freelancer who uses this site as a kind of virtual advertisement.

Servers Part 2: more than storage?


We have established that the server functions as a storage place for our files, but it is important to recognize servers can also do things. Similar to the operating systems software on our personal computers, servers have software that allows them to access and organize files. Servers can also carry out more advanced functions. Take, for example, what the server does when someone visits the root directory of your site; the server automatically loads your index page (e.g., index.html, index.php, index.asp). This is a very simple example of something that happens on the 'server side.'

Why do I need includes?


Now that we understand that remote servers have software on them capable of carrying out certain tasks, we can turn our attention to the 'includes' portion of the equation. What are includes? Let's take our hypothetical web site that serves as an advertisement for our imaginary freelancer. Imagine that the freelancer designs a left hand navigation menu so that people can easily browse all five pages of his site. Therefore, each page of this site contains the code for the navigation bar. Imagine that a few months after launching this web site, our freelancer wants to add a Frequently Asked Questions page. Our freelancer now has to update the navigation bar code in each of his five existing pages. Now there are six pages with this same navigation bar code. A month later our freelancer wants to add a self-written article to his site. Once again every page on the site needs to be updated. Imagine having a site with 100's of pages. Do you want to manually update 100's of pages of code? These are the types of situations where virtual includes can save you hours of time.


What are we including on the server side?



Perhaps it would be better to think of includes as 'modules' that we can insert into our web pages. These modules (or 'includes') are usually just text files that contain HTML code (although they can be other file formats). The code inside these files can be inserted anywhere in a page simply by using an include command. For example, imagine for a moment that our freelancer had the foresight to realize that the navigation menu would change at some point in the future. Instead of putting the code for the navigation menu into each individual page, the freelancer placed this code into a separate file. For the sake of example, we can call this file nav-menu.html Our freelancer can now simply place an 'include' command that refers to the nav-menu.html anywhere he/she wants to place this menu. The advantage of this is becomes apparent when our freelancer needs to modify the navigation menu. Just one file needs to be edited, nav-menu.html, and all the pages containing 'include' refering to this file will automatically update themselves. This time savings is the primary advantage of using includes.


OK, I get it, but what does an include look like?


Even though this is not a 'technical' article, many of you are probably wondering what an 'include' looks like. Therefore, one example for PHP is included below. Please note PHP is just one type of scripting language that can be used, depending on what your server is running. In this example, the code contained in the file 'nav-menu.html' will be inserted into any web page where the following code is placed:





Keep in mind that, for technical reasons, server side includes will never be visible when you view the source code for a page in your browser. This is because the include happens on the server (before presenting the resulting code to the browser). This makes the use of SSIs invisible to browsers, bots, spiders (which is why they are search engine friendly)


Summary


The catch-22 of server side includes is that the need for them only becomes apparent when faced with the task of updating tens or hundreds of pages of code. There are many resources on the web that will instruct you how use virtual includes, and procedures will vary depending on the type of scripting language supported by your server (e.g., ASP, PHP). Hopefully you now understand Server Side Includes and how they can benefit the webmaster.









About the authors:

This article was written by the editors of the Kabooli Internet Directory. This article may be used freely in opt-in publications and websites as long as the article not changed in any way and all links in the Authors section are active . A courtesy link to any online posting would be greatly appreciated and can be sent to the editors of the Kabooli Directory by using the Kabooli Internet Directory Contact Form






Ultimate Guide To Job Interview Answers. - Interview Guide that converts like crazy! - #1 in Two (2) Cb categories! Lots of adwords possibilites.
Easy Face Painting. - Step-By-Step Face Painting Guide Makes Face Painting So Easy Even Non-Painters Can Look Like Pros.

Lately I've taken to subscribing to many newsletters and the "free" programs being offered by internet marketers - think Frank Kern, Yanik Silver et al. - and people like Aaron Wall and Shoemoney and that Brian fellow over at Copyblogger.

If you, like me, receive some of these emails, you may have noticed how their sales methods have taken the typical long web page sales pitch and turned it on its side. They've spliced it into emails and videos and feed that info to us in a much more interactive and entertaining manner then the long winded sales pages of old.

So this morning while trying to convince my 21 month old son to go to the park (that's right, to convince him to go to the park) I found that the usual things were not working. That is when it hit me.

Parental persuasion ala Frank Kern

Please note that I have not met nor do I know Frank Kern, and I am only singling him out because his name stuck with me. I suppose this parody below could be recognizable to Jeff Walker's children as well. One last note, I have found the free info they give away as they get you to the offer/pitch/monthly service to be quite valuable.

  • Dad: Hey son, want to go to the park with your favorite car and play on the swings?
  • Son: No!
  • Dad: Oh, did I mention that I found some extra strawberries, your favorite fruit? I figured you would want them and washed some for you. Want to go to the park with your favorite car and play on the swings and have some strawberries?
  • Son: My car...? No!
  • Dad: We can take the little soccer ball and some balloons. We know you like balloons so we bought some extras last night. Want to go to the park with your favorite car and play on the swings, with the ball and the balloons and have some strawberries? You don't have to do anything, just have fun!
  • Son: Balloons...? Where's my car? No!
  • Dad: Hey listen. Its 8:00, the street cleaner will pass soon. If we go now we can also see the street cleaner! You love the street cleaner and if we don't go now who knows when he will pass again.. Maybe never! Want to go downstairs and see the street cleaner, then go to the park with your favorite car and play on the swings, with the ball and the balloons and have some strawberries?
  • Son: Street cleaner...? Balloons...? Where's my car? Hmm... (asks for shoes, walks over to the car...) No!
  • Dad: Listen. If we go down now, we can stop at the bakery. I'll order an espresso (you love the noise from the espresso machine!) and get you some toast and jam (I'll pay; you get this fre.e!) and we can sit at a table outside and watch the street cleaner. Then we can go to the park with your favorite car and play on the swings, with the ball and the balloons and have some strawberries? And one last BONUS: we can stop at the fountain and throw in some rocks!!

    Look, if you don't have fun doing this, later I will take you to the pool.
    YOU CAN"T LOSE!!

  • Son: (getting up on the car...) Yes! Lets do it! (makes some vroom vroom noises with the car).

Father and son head down the elevator out to the bakery. Son demands the water fountain in the park so we head straight there, where strawberries are eaten and some rocks thrown in. Then he says "casa" (hey, we live in Spain) and demands to go home. We stop to watch the street cleaner pass by and head home, not having visited the swings, played with the balloon or balls or had breakfast at the bakery.

(Okay, so in the end I also pick on we folks who buy these things - be they live the internet lifestyle products or self-help books - and don't implement them to the fullest :)



Article Index: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79


More Articles:


1. Does Your Website Sell or Smell? By Mark Bellinger
Your website does not stand much chance of selling anything if it pays scant regard to the user.In other words your Site Visitor’s experience, in terms of the following, is what will make your site sell or smell!The following 7 guidelines are all equally important and will determine the success of your website.1. Functionalitya) Functionality is a double-edged sword in that the site must fulfill the users' requirements only if they are your targetted users.You cannot be everything to everybody…

2. PRINTING INNO-VENTIONS
During the early times, when machines were not yet capable of doing human chores, the art of printing was done by hands. Everything has to be written. Imagine working and doing things manually like writing your report and having to rewrite them over and over to make copies. Pretty exhausting, isn’t it?But then, the typewriter made a dramatic appearance in the printing industry. Although slow and manually operated, it was considered as one of the greatest invention that time. Making writing an ea…

3. How To Choose Good Search Engine Optimisers
SEO usually stands for 'Search Engine Optimiser' or 'Search Engine Optimisation'. Search Engine Optimisation is important to anyone who wants their website to rank well in major search engines. SEO is a complex process. Outsourcing your site to a SEO specialist or firm can be a good solution if you are busy and do not want to pay the penalty of being blacklisted by search engines in case you have done something 'unethical' unknowingly. This article outlines some important criteria to look for in…

4. Web Site Buyers, Beware
Web Site Buyers, Beware How to spot incompetent web designers and web masters. This article is based on the personal experience of the writer and is aimed primarily at 'Newbies ' but can be of value to anyone interested in buying a web site or web site services. The Internet has spawned a dearth of experts and so called experts. Many of the former are highly competent, dedicated professionals, some of whom dedicate their time to furthering Internet technology. Unfortunately it has also subjected…