Configuring Apache webserver for browser caching of web content…

This is a HUGE topic, I’ve outlined some simple steps below as well as my initial configuration for you to start with…

NOTE: this is for simple ‘static’ content such as images, additional work is required for dynamic (program generated) content, such as that generated in PHP.

1. In ‘httpd.conf’ make sure the following line is uncommented.

LoadModule expires_module modules/mod_expires.so

2.  In ‘httpd.conf’ add the following:

ExpiresActive On
### Expire images 1 day from when they’re accessed
ExpiresByType application/java-archive “access plus 1 day”
ExpiresByType image/gif “access plus 1 day”
ExpiresByType image/png “access plus 1 day”
ExpiresByType image/jpg “access plus 1 day”
ExpiresByType image/jpeg “access plus 1 day”
ExpiresByType image/x-icon “access plus 1 day”
ExpiresByType text/css “access plus 1 day”
ExpiresByType text/javascript “access plus 1 day”
ExpiresByType text/xml “access plus 1 day”
ExpiresByType application/xml “access plus 1 day”
ExpiresByType text/plain “access plus 1 month”
 

3. (Optional) Set default expiry of content in ‘httpd.conf’:

### Expire everything else 1 day from when it’s last modified
ExpiresDefault “modified plus 1 day”

NOTE: These we’re my original settings, you may want to add attitional MIME type and expiry configurations particular to your web content.

REFERENCES:

Windows Tools for reading NTFS and Linux partitions

I’ve had to do my share of hard-drive recoveries over the years and have found the tools provided by DiskInternals to be invaluable in several occurances.

I’d previously used their NTFS Reader software to recover files from bad partitions after multi-booting to an older Windows operating system drive on the same machine.

Now I’ve found that they offer an EXT2/EXT3 Reader to allow Windows to access Linux partitions.

This is great for less-technical users that experience fatal errors in their operating systems as there’s now a relatively simple way to access the ‘familiar’ Windows tooling to recover files on the ‘bad’ partition. For the power-user, this affords a means for people making the switch to Linux a means in which to access their files in Windows in the off chance that they have to use software not usable under WINE.

Product Pages:

NOTE: Similar tooling exists to read Mac HPFS partitions, that topic saved for a later post!

Cheers!

WINE Is Not an Emulator

I post a lot about open source applications, WINE is another notable contender as it gives users an option to run many mainstream Window applications on a Linux (even Apple’s OS/X variant) platform by providing access to the Windows API’s to those host operating systems.

http://www.winehq.org/
http://appdb.winehq.org/ – List of applications supported

Ah, for those of you still running IBM’s OS/2 platform, you too can run Win32 applications with Odin:
http://odin.netlabs.org/

Cheers!

Windows Registration Key Finder

If you’re like me, you’ve probably got more than one computer configured. The problem comes when you want to re-image one of them, but don’t have an accurate idea of which software license key’s are used by individual machines. Windows makes this difficult to recover as it doesn’t store them in a logical manner where any human could find and read them.

Additionally, it’s not until late in the installation process of Windows that you even have the option to enter a key, at which time you have to call Microsoft if the key was used by a different machine. (There’s some funny logic around this related to hardware configuration changes too).

Magical Jelly Bean KeyFinder searches and displays the keys on any post Windows-95 installation:
http://www.magicaljellybean.com/keyfinder.shtml

NOTE: This not only displays the Windows key, but also other installed software like Office and even many games.

Cheers!

Closed on the sale of the ‘old’ house!

On Friday March 28th “we” no longer have two households. It’s been a long and arduous journey, involving three separate realtors (long story), re-painting and lots of other work, but the house is finally sold after almost 10 months in this market.

Thanks goes to the following, of which I recommend for your future needs…

Selling agents:
John & Pat LaDeur of Stark Realty in Bloomingdale, IL

Attorney:
Michael A. Galason

We’ll miss the old home in Carol Stream as we’d been there almost 8 full years, but new adventures and memories are already being formed in the new house.

whew!

Free Windows Defragmentation Software

Windows, due to it’s MS-DOS heritage has a lot of problems due to disk fragmentation.  To maintain optimal disk read speed, it is advised to “defrag” on a regular basis.   Whether or not LINUX has similar problems remains a subject of debate.

I’ve used many different defrag utilities over the years,  my current choices are Diskkeeper Lite and Defraggler.

Most of these vendors are free or provide free trials of their software, I’ve noted the versions I’m familiar with.

Here’s the run-down:

  • Windows Defrag – installed with Windows.
    •  this is provided with (I believe) all versions since Windows 98.
  • Diskeeper – retail
    • – this is the commercial version that was licenced to Microsoft for use with Windows.
    • Search for the older free “Diskeeper Lite 7.0.418”
  • Pirisoft Defraggler – free
  • O&O Defrag – retail, search for older version 4 which was free.
  • Norton Speed Disk – retail

I have not used the following, but they appear to be worth a look:

WARNING – if you use hard-drive encryption, defragging may cause your drive to become unreadable.  Defrag with caution.

Happy Defragging!

Happy Leap Day

Ah,  we have an extra day this year.   Each time it reminds me of just how many people assume that these happen every four years, completely disregarding the rule or reason for these.

  1. Every year divisible by 4 is a leap year,
  2. of those years, if it is divisible by 100, it is NOT a leap year, unless
  3. the year is divisible by 400, in which case it IS a leap year.

The year 2000 was a leap year for this reason, as you can see… unless you apply all of the rules, your programatic date calculations may be incorrect in these cases.

While on the topic, there’s also the little known concept as a ‘leap second’, unless you are involved in communications or scientific applications you are probably not aware of this.   Back when I was involved in submarine communications, we used to have to update our atomic (cesium beam) clocks to accomodate this irregularly planned change.

References:

By the way, Happy Birthday to you ‘young ones’ born today!

CSS ‘id’ vs. ‘class’

This is a fairily standard interview question for someone that claims to understand CSS, but you’d be amazed at the number of developers that just don’t get it.

Assuming

<style type=”text/css”>
div#error { color:red; }
div.error { color:red; }
</style>
<div id=”error”>This is error text shown in red.</div>
<div class=”error”>This is also error text</div>

Notice that an ID’s CSS is an HTML element, followed by a “#”, and finally ID’s name – “element#idname”.

Also, be sure to absorb the fact that when an id is used in HTML we must use ‘id=”name”‘ instead of ‘class=”name”‘ to reference it!

A simple way to remember this is to refer back to how you think of page anchors. Those URL’s must also be unique and use the “#”.

Why Did They Choose Those Names??

  • ID = A person’s Identification (ID) is unique to one person.
  • Class = There are many people in a class.

NOTE: You can also use inline styling (with no id or class), or style the HTML elements themselves, but those will be covered in a later posts.

Immigration Reform?

Last year I witnessed first hand the numerous protests in Chicago for immigration reform.   This email from a friend of mine (Annette) echoes most of my feelings on the topic.

“Let’s say I break into your house” 

A lady wrote the best letter in the Editorials in ages!!! It explains things better than all the baloney you hear on TV.

Her point:
Recently large demonstrations have taken place across the country protesting the fact that Congress is finally addressing the issue of illegal immigration.

Certain people are angry that the US might protect its own borders, might make it harder to sneak into this country and, once here, to stay indefinitely.

Let me see if I correctly understand
the thinking behind these protests.
Let’s say I break into your house.
Let’s say that when you discover me in your house, you insist that I leave.

But I say, “I’ve made all the beds and washed the dishes and did the laundry and swept the floors. I’ve done all the things you don’t like to do. I’m hard-working and honest (except for when I broke into your house).”

According to the protesters:

You are Required to let me stay in your house
You are Required to add me to your family’s insurance plan
You are Required to Educate my kids
You are Required to Provide other benefits to me and to my family
(my husband will do all of your yard work because he is also hard-working and honest, except for that breaking in part).

If you try to call the police or force me out, I will call my friends who will picket your house carrying signs that proclaim my RIGHT to be there.
It’s only fair, after all, because you have a nicer house than I do, and I’m just trying to better myself. I’m a hard-working and honest, person, except for well, you know, I did break into your house.
And oh yeah, I get a free education, where you have to pay your own way through college.(TEEHEE)
And what a deal it is for me!!!

I live in your house, contributing only a fraction of the cost of my keep, and there is nothing you can do about it without being accused of cold, uncaring, selfish, prejudiced, and bigoted behavior.

Oh yeah, I DEMAND that you learn MY LANGUAGE!!! so you can communicate with me. And don’t forget to make sure your forms are in MY language – I need to understand them…

Why can’t people see how ridiculous this is?! Only in America!

If you agree, pass it on ( in English ).
Share it if you see the value of it.
If not blow it off……… along with your future Social Security funds, and a lot of other things.

In closing, we’re all immigrants to this country, it’s even been scientifically proven that Native American (Indians) migrated across the Siberia-Alaska “land-bridge”.
My simple point here is that past generations of immigrants came to this country and had to survive on their own merits and hard-work, they were not given a free ticket as the current Liberal movement in this country insists on providing.

Water fountains in the desert, so that the illegals don’t die of dehydration…. Please!”   How many European immigrants died on their way to their America?  And they were, generally immigrating via legal means!

Good Day!

HTTP is deprecated?

I found this several years ago, and ‘most’ of my websites implement this standard.

While “http://” implies IP Port 80, and “https://” implies IP Port 443, the payload of such traffic is no longer limited to HyperText (the “HT” in HTTP). To support future protocols, it is advised that websites not force this upon future implementations of the IP stack.

Unfortunately, there is ONE case that implementation of this process can cause your websites. If you run on non-standard ports (or use HTTPS), you’ll still need the protocol (“http:” or “https:”) on the links used to swap protocols.

Obvious advantage here is that all of your links can be shortened.

More information is available at:

http://www.no-http.org/

Cheers!