Untangling Spaghetti HTML

Written by Sunil Tanna


Continued from page 1

2. Forrepparttar web server based technologies (SSI, ASP, PHP), firstly not every web site supports these facilities, and secondly, they do put extra processing load on your web server. For most small sites,repparttar 134573 extra load is not going to make a difference, but if you have a very busy site, it could berepparttar 134574 straw that brokerepparttar 134575 camel's back.

3. Even if you can live withrepparttar 134576 first two problems, there's still some major issues: Includes can help resolverepparttar 134577 spaghetti problem on new projects, but what about projects you've already completed and want to update? What about if you plan on using Includes, but didn't realize atrepparttar 134578 start that something was a common fragment? What about ifrepparttar 134579 fragment of code you want to replace was something that's too small to bother including every time (like a font name, or a single-word spelling-mistake, or an affiliate link)?

So, at best, Includes can help, but they are far from a panacea.

AN ALTERNATE APPROACH...

If I finishedrepparttar 134580 article at this point, you'd probably think I had merely told you (or reminded you!) about a nagging problem, but left you with no solution.

Fortunately there is one, and it's a good one. Atrepparttar 134581 beginning of this piece, I reminded you that HTML files are really text files containing HTML computer code. This means you can use text-editing tools to manipulate individual files, or better yet, all your files in one go.

A good Find and Replace program will update all your files easily and very quickly. Better yet, you don't need to be a programmer, and you don't need to understandrepparttar 134582 intricacies ofrepparttar 134583 HTML language - it's easy enough for anyone. Another advantage is that unlike editing files manually, there is no possibility of it making a mistake on page number 342 of 427.

While there are many Find and Replace programs onrepparttar 134584 market, it's best to get one that is specifically designed for HTML files. For this reason, I'd recommend Alias Find and Replace, which you can get from: http://www.aliassoftware.com/

This is a nice Windows-based program with a lot of powerful features, but is also easy to use. There's even a free trial download, so you can try outrepparttar 134585 program at no risk.

Once you've gotrepparttar 134586 program, you can use it to make global changes across all (or a selection of) your HTML files, stick with plain HTML (and never worry aboutrepparttar 134587 spaghetti issue again!), or use it as a stepping stone towardsrepparttar 134588 Include method.

A FINAL THOUGHT

What many people don't realize when they first create a web site, is that as much or more work can go into updating it, as in writing inrepparttar 134589 first place.

Updating can be particularly painful (and time consuming) if you don't plan ahead, and you do everything manually. So plan ahead, userepparttar 134590 techniques and tools I've shown you in this article, and you'll be surprised how much easierrepparttar 134591 update process can be.

----------------------------------------------------------------- Copyright, S. Tanna, webmaster and publisher of EBookCompiler.com Create your own E-Books that you can give away free to drive massive traffic to your web site, or sell for profit. Download a FREE copy ofrepparttar 134592 software today at: http://www.ebookcompiler.com/



Copyright, S. Tanna, webmaster and publisher of EBookCompiler.com Create your own E-Books that you can give away free to drive massive traffic to your web site, or sell for profit. Download a FREE copy of the software today at: http://www.ebookcompiler.com/




Using SSI's to Ease Site Maintenance

Written by Lauri Harpf


Continued from page 1

Fortunately, there's no need to start renaming any files. You can simply instructrepparttar server to treat your ".html" files as ".shtml" files and execute all SSI instructions in them. This can be done with a ".htaccess" file. If you already have one, you'll have to edit it. If you don't, open up a text editor, such as Notepad, and pasterepparttar 134572 following lines into a blank file. Be sure to replace .html with .htm, if you're using that extension.

Options Includes AddType text/html .html AddHandler server-parsed .html

Saverepparttar 134573 file in "All files" mode and name it ".htaccess". Includerepparttar 134574 quotes so that Notepad won't decide to namerepparttar 134575 file ".htaccess.txt".

Changing Your Pages ===================

Afterrepparttar 134576 .htaccess file has been created, you'll have to make changes to your HTML files. To be onrepparttar 134577 safe side, take backups of them before doing anything. Then, pasterepparttar 134578 HTML you use to generaterepparttar 134579 menu from one of your pages into a blank file. Saverepparttar 134580 file as "navig.html" for example. Next, removerepparttar 134581 navigation menu from all of your pages. Replace it withrepparttar 134582 following line:

What you're doing is tellingrepparttar 134583 server to insertrepparttar 134584 code from "navig.html" intorepparttar 134585 page. This will be done beforerepparttar 134586 page is sent torepparttar 134587 user who has requested it, so anyone visiting your site will merely see a normal HTML file. When you have finished editing your files, connect to your host via FTP and uploadrepparttar 134588 ".htaccess" file,repparttar 134589 "navig.html" file andrepparttar 134590 new versions of your content pages.

Then it is time forrepparttar 134591 true test, trying to visit your site and see what happens. If you have done everything correctly, you should see that your pages lookrepparttar 134592 same as before. However, if you make a simple change torepparttar 134593 "navig.html" file, it will apply torepparttar 134594 navigation menu of every page. What used to take minutes or even hours can now be done in seconds, giving yourepparttar 134595 possibility to use that valuable time to do something other than changingrepparttar 134596 HTML code of each page separately.

Lauri Harpf runs the A Promotion Guide website, where he offers free information about search engines, directories and other promotion methods. His site can be found at http://www.apromotionguide.com/


    <Back to Page 1
 
ImproveHomeLife.com © 2005
Terms of Use