Advertise Here
 

A Beginners Guide to Server Side Includes


Placed in Website Design | December 28th, 2009

An Introduction to Server Side Includes

Newbie? That’s okay!

Although much has been written about Server Side Includes (SSI also known as Virtual includes) much of this information is known for intermediate to advanced webmasters. This article is for beginners. It is assumed that the reader has no previous knowledge of scripting languages, server or any other advanced his knowledge. In this article, the reader will conceive on SSIS and explain how they are used in the development of the site. SSI is to ensure that you save time when you develop your site and changed over time.

Server: just a place for your order?

It is important to understand that all code for your website stored remotely on a computer called a server. Is a very basic level, the server (remote computer), just a place where you can store files on the ‘Net. ” These files usually contain your site is HTML, and possibly some files containing images or graphics.

For example, a simple Web page can contain 5 pages, with five corresponding files that are stored on the server. A file named index.html, and we will be four additional files. These files can be Me.html designated, education.html and portfolio.html resume.html. We say it is a simple 5 page website from a freelancer who uses this site as a kind of virtual advertising launch.

Server Part 2: more storage?

We found that the server is used as storage for their files, but it is important to recognize servers can also do things. Similar to software operating system on our PCs, servers have software that can create and access files. The servers can also perform advanced functions. Take, for example, what the server when someone visits the root directory of your website, the server automatically loads your index page (eg, index.html, index.php, index.asp). This is a very simple example of something that happens on the server “side.”

Why do I need too?

Now we know that the remote server software that they agree to perform certain tasks, so that we can focus our attention on the “also” part of the equation. What cover? Consider our hypothetical Web site that serves as a freelance advertising for our imagination. Imagine that the freelancer is a design left navigation menu, that people can easily go five pages of its website. Therefore, each page of this site contain the code for the navigation bar. Imagine a few months after the launch of this website, our freelancer wants to add a Frequently Asked Questions. Our freelancer now has the navigation bar code in each of its five existing sites to update. Now there are six pages with the same code navigation bar. A month later our freelancer wants further writes articles for his website. Once again, each page will be updated on the site. Imagine a site with 100 pages. Do you want to update manually to 100 pages of code? These are the kinds of situations in which you can include virtual hours.

What are we on the server side?

Perhaps it would be better to think of “modules” that we insert into our web pages. These modules (or “contains”) are generally simple text files containing HTML code (although they may also use other formats). The code of these files can be inserted anywhere in a page with a simple include command. For example, imagine for a moment that our freelancer had the foresight to understand that change is the navigation menu at some point in the future. Instead of putting the code for the navigation menu on each page, insert the code in the freelancer a separate file. For the sake of example, we can call this file nav-menu.html our freelancers can now simply a place to “include” command to the nav-menu.html wherever it applies, or she wants to put this menu. The advantage of this becomes evident when our freelancers to have to change the navigation menu. One file must be edited, nav-menu.html, and all pages “include” a reference to that file will automatically update. This time saving is the main advantage of using includes.

OK, now I understand, but which resembles an include?

Even if this is not a “technical” articles, many of you are probably wondering what looks like an include. “Thus, an example for PHP is below. Please note that PHP is one type of scripting language that can be used, depending on what your server is running. In this example, the code is contained in the file “nav-menu.html” is on a web page where the code is inserted :

Note that for technical reasons, the server side is never visible when you include the source code of a page in your browser. Because what happens on the server (before submitting the resulting code) for the browser. This makes use of CSS browser invisible robots, spiders (which is why they are search engines)

Abstract
The Catch-22 of server side includes is that the need is evident to them that when the task to update dozens or hundreds of pages of code face. There are many resources on the Web is that you use to load a virtual includes, and procedures for the type of scripting language supported by your server (eg ASP, PHP vary). You understood, server side includes and how they benefit the webmaster.






Advertise Here



All other brands, product names, company names, trademarks and marks are the properties of their respective owners.

Post a Feedback





Technorati Profile

Internet Blogs - BlogCatalog Blog Directory

Join My Community at MyBloglog!