Identifying Orphan Files

(originally published in the Possibilities ezine)

As many of our readers know, Bontrager switched hosting companies recently, moving to Site5.

It was a good move. We like it here. Something we noticed, however, are many files we're uncertain whether or not are still needed.

We do a lot of development, a lot of testing, and sometimes we neglect to remove the test files. This has been going on for 8 years.

The possibly orphan files were brought to our attention when we moved our sites to the new hosting company. Are the files adrift with no purpose or do we need them?

To answer that question, we put some JavaScript into each of the orphan files. The JavaScript launches a CGI script that logs it's use.

If an orphan doesn't show up on the log after a reasonable amount of time, it can be removed from the server. With many thousands of files on our server, removing these reduces clutter.

I'll show you how to do it.

Note: This can be done only with files of text, ie web pages and files that might be included in web pages. Image files can't be tagged this way.

Here is the Perl script. Install it on your server with any file name that makes sense to you. The example JavaScript assumes "logger.cgi", but you may use any legal name.

The above Perl script prints the date and time according to the server and then prints any information sent to it by the JavaScript. The log file is tab-delimited so most popular desktop spreadsheet programs can import it.

You'll notice the Perl script allows you to specify the log file name. Also, the place where the date formating occurs is marked in case you want to change it.

The JavaScript (see below) needs to be pasted into each orphan file you want to monitor.

It has a place where you specify the URL of the above Perl script. And it also has a place where you can identify the individual orphan file the JavaScript is pasted into.

 

The JavaScript sends your identity information about the orphan file to the logging script, along with the URL of the web page where the file was used at.

This provides more than just a heads up for you. If the file was included in a web page, you also know the URL of the web page it was included in.

The identification of files that do not show up in the logs after a reasonable period of time can be considered orphans.

Will Bontrager
Copyright 2006 Bontrager Connection, LLC

 

Your Opinion Matters!

Please, tell me what you think about this article. I promise the page will not reload...it’s quick and easy

 

(find out HOW this is done HERE)

traffic

WebDesigners-Directory 

 

ROR  

www.bessed.com

identifying_orphan_filesdlperry.com

design     develop    enhance     manage     software

dlperry.com

HOME

XML Content FeedsRSS Content FeedsROR Search Engine Feeds 

[website services] [site enhancements] [professional cgi] [contact us] [web site resources] [Free Info Center] [business resources]
[dlperry.com] [internet website resources] [identifying_orphan_files]

H O M E

About dlperry.com:
   Sitemaps
   Contact Info
   Designers Bio
   References
        -->portfolio
        -->testimonials
   Legal
        -->orders & payments
        -->privacy

Website Services:
   Website Design
        -->intuitive design?
        -->the design process
        -->design guide
        -->cost estimator
   RSS Feeds
   Site Management
   Website Promotion
   in Google in days
        -->boost your site traffic.
        -->Google on Sitemaps.
           PageRank and more.

Site Enhancements:
   Autoresponders
   Custom 404
   Forms
   Syndicators
   Free scripts

Professional CGI:
   B-mailer™
   ClickWatch
   FormJobber
   Grab-n-Code

Business Resources:
   Finance
   Data Management
   Directories & Forums
   Programming
   Software
   Web Development
   Misc. Tools

Internet Resources:
   Bontragers’ weekly
   Possibilities ezine
   FAQ
        -->cgi faq
        -->design
        -->domain names
        -->general
   Free Info Center
   Free-Wares
   Website Resources:
        -->How To’s:
        -->Tips:
        -->Tools:
   SpiderSite
   More -->

Intuitive website design, enhancements, functionality for websites, site management and web site promotion, RSS, ROR, SEO


 

Resources for Website Managers and Designers

 

 

Intuitive InSite

~ Blog-Etiquette ~

Google Sitemaps Beta
"We use Google Sitemaps to inform Google's crawler about all your pages and to help people discover more of your web pages."

Add to Google 

I <3 SEOmoz 

 

Master Form V4