Archive for March, 2007

Fast, Effective PHP Compression

Posted on March 26, 2007 in Function by Jeff Starr

PHP compression is an excellent method of conserving bandwidth and reducing client download times. We have already discussed an excellent method for CSS compression, and in this article we share a super-easy technique for compressing all PHP content without editing a single file.

Using two PHP files and two corresponding lines of .htaccess, it is possible to compress your PHP files via gzip-encoding. Browsers and other user-agents capable of interpreting gz-encoded data will employ the compressed content, while other user-agents will utilize the content uncompressed.

Continue Reading

Flash-Detection Triple-Threat

Posted on March 19, 2007 in Accessibility, Function by Jeff Starr

In our previous article, Alternate JavaScript Slideshow for SlideshowPro, we present an elaborate method for providing alternate content specifically for SlideshowPro. Although the method points toward a more generalized adaptation, its overall functional implementation remains focused on the presentation of slideshows.

This article explores the generalization of the previously defined method for providing alternate JavaScript content when Flash support is not detected. Using skyzyx.com’s excellent Flash-detection script, Flash Detect 3, we will outline a general approach for supporting the following browser configurations:

Browser supports the required version of Flash
Excellent. This is the ideal situation. Your Flash-based content will be displayed as intended.
Browser supports Flash, but has not upgraded to the required version
Okay. In this situation, you could serve either JavaScript content or retro-Flash content (i.e., Flash content that requires a lesser version of Flash). Detection is also provided for virtually any version of Flash, enabling delivery of multiple movie alternatives.
Browser does not support Flash, but does support JavaScript
Not bad. Non-Flash browsers will receive alternate JavaScript content. User’s won’t know what they’re missing.
Browser does not support JavaScript, but does support Flash
For Flash content that does not require JavaScript to function, the browser will display the Flash content as intended, assuming sufficient Flash version. When the version of Flash is insufficient, non-Flash users will see either retro-Flash content, animated gif content, or static image content, depending on your preference.
Browser supports neither JavaScript nor Flash
Worst case. Even so, all hope is not lost. In this situation, visitors will see either animated gif content, or static image content.

Continue Reading

Perishable Press Redirection Lounge

Posted on March 19, 2007 in Nothing by m0n

Welcome to the Perishable Press Redirection Lounge!

You are always welcome at the Redirection Lounge!

What?
We keep a very close eye on all 404 (resource not found) errors. Every time a legitimate 404 rears its ugly head, we take the necessary steps to solve the issue. In most cases, we use htaccess redirects to prevent 404 errors. Often, the missing resource remains available, but has been moved to another location. In this situation, we simply redirect visitors to the new location. Easy. However, there are also a relatively small number of 404 errors that are generated due to content that is no longer available. For example, temporary posts, test posts, and duplicate posts often result in 404 errors, even if they were only online for a very short time. So, rather than redirecting such requests to the home page or to the 404 page, we have created an exclusive Redirection Lounge at which roaming search engines, misguided robots, and wandering visitors may find information and reassurance.
Where?
This page is actually a post handcrafted especially for this very moment in time. The post is public, exists online, and is archived at Perishable Press. In other words, you are currently deep within the Perishable Press Archives. To escape such ancient realms, click here to return to the Perishable Press home page. Otherwise, click on some other link to fight your way out of the archive database. Otherwise, enjoy your stay here at the Perishable Press Redirection Lounge. It may not be exactly what you originally had in mind, but you have to admit, the solitude provides plenty of time to think about that interesting life of yours.
Why?
You are here because you tried accessing a resource at perishablepress.com that is no longer available. Please note that the content you are seeking has not been relocated, misplaced, or renamed — it is simply no longer available on this domain. Most likely, the content has been deleted permanently. If you are absolutely convinced that the content you are seeking is worth pursuing, please check out the Google index or the excellent Wayback Machine. Indeed, if the requested content were still available on this domain (perishablepress.com), our diligent web gimps would have redirected you swiftly to the new location of the resource. However, as the requested resource is not available, and because we try to avoid as many 404 errors as possible, we have created this Redirection Lounge to serve as our official redirect target for otherwise dead-end requests. We hope you find it as comfortable as it is informative.
Huh?
If you feel that you have arrived at the Redirection Lounge in error, or have information concerning the requested resource, please use our official contact form to drop us a line.

Alternate JavaScript Slideshow for SlideshowPro

Posted on March 12, 2007 in Accessibility, Function by Jeff Starr

For the unenlightened, SlideshowPro (SP) is a Flash-based slideshow-authoring system that delivers full-featured, high-end, Flash-based slideshows. Websites featuring SP slideshows present content in sophisticated fashion, inspiring users with elegant captions, beautiful transitions, and intuitive navigation.

However, many visitors are unable to experience SP slideshows because they lack the requisite Flash support. SlideshowPro-based slideshows currently require Flash 7 or better to function. And, although Flash 7 is quite common, it is far from ubiquitous. In the "worst-case" scenario, Flash-challenged visitors will see a broken webpage or missing content. Unfortunately, the typical "best-case" scenario is not much better, as non-Flash users typically will see a single, static image, which is generally served via something similar to:

<object classid="clsid...">
 <param name="movie..." />
 <embed src="http://domain.tld/..." />
 ...
 <img src="http://domain.tld/path/to/alt/image.jpg" alt="alternate image served for non-Flash browsers" />
 ...
</object>

Continue Reading

Go Back via JavaScript and PHP

Posted on March 12, 2007 in Function by Jeff Starr

Use this simple code as a button that will return users to the previous page:

<form>
 <input type="button" value="Return to previous page" onClick="javascript:history.go(-1)" />
</form>

Here it is as a simple text link:

<p>
 <a href="javascript:history.go(-1)" title="Return to the previous page">&laquo; Go back</a>
</p>

You can make things easier by serving PHP and printing the link automatically. Here is the button link:

echo "<form><input type=\"button\" value=\"Return to previous page\" onClick=\"javascript:history.go(-1)\"></form>";

And here is the PHP code to print a "Go back" text link:

echo "<p><a href=\"javascript:history.go(-1)\" title=\"Return to previous page\">&laquo; Go back</a></p>";

Better yet, you can kick the accessibility factor up a notch by using PHP’s inherent HTTP_REFERER variable to write explicitly the previous URL, thereby eliminating the JavaScript requirement (thanks to Rick Beckman for the idea):

<?php $referer = $_SERVER['HTTP_REFERER'];
   if (!$referer == '') {
      echo '<p><a href="' . $referer . '" title="Return to the previous page">&laquo; Go back</a></p>';
   } else {
      echo '<p><a href="javascript:history.go(-1)" title="Return to the previous page">&laquo; Go back</a></p>';
   }
?>

The previous code will create an explicit "Go back" link when the referring URL is known. In those awkward situations where no referring URL has been recognized, the function writes a "Go back" link via JavaScript.

Search Engine Registration Notes

Posted on March 3, 2007 in Optimization by Jeff Starr

In his excellent book, Search Engine Optimization for Dummies, Peter Kent explains that many search engines actually get their search results from one (or more) of the larger search engines, such as Google or The Open Directory Project. Therefore, the author concludes that it may not be necessary to spend endless hours registering with thousands of the smaller search sites. Rather, the author provides a brief list of absolutely essential search sites with which it is highly recommended to register. Further, by registering with the following sites, your site will be listed in a significant majority of all search engines.

Continue Reading

SEO 101: Establishing and Evolving an Effective Link Strategy

Posted on March 3, 2007 in Optimization by Jeff Starr

Optimizing your website for the search engines involves many important aspects including keyword development, search engine registration, and SEO logging. This Press post scopes yet another critical weapon in the SEO wars: establishing and evolving an effective link campaign.

Within your SEO log, you should devote an entire section to the logging of all link-related activity associated with optimizing your site for the internet. For example, you may wish to subcategorize your link campaign according to whether the links are elsewhere, pointing to your site (referring/incoming links), or present within your site, pointing to other sites (external/outgoing links). Users may also benefit from tracking activity for internal links, which point to other locations within the same domain.

We will begin our article by focusing on incoming and outgoing link strategies, proceed with a few tips for internal links, and then conclude with some ideas for getting links.

Continue Reading

Random Fixinz for Hotmail via Outlook Express

Posted on March 3, 2007 in Technology by Jeff Starr

Note: The methods described in this post apply to older versions of Internet Explorer (<6) and Outlook Express (<6), and are provided here for reference purposes only.

Fix the "Unable to poll for new messages" error

Here is an error message that some Outlook Express users receive when sending or receiving email, or after creating a new email account:

Unable to poll for new messages on your HTTP server. 
Account: 'Hotmail'
Server: 'http://services.msn.com/svcs/hotmail/httpmail.asp'
Protocol: HTTPMail
Server Response: 'End tag 'D:response' does not match the start tag 'D:prop'. 
Port: 0
Secure(SSL): No
Error Number: 0xC00CE56D

Continue Reading

Dazzle, Marvel and Wonder

Posted on March 3, 2007 in Graphics, Pleasure by Jeff Starr

One of our favorite command-line screensavers, DAZZLE is a two-dimensional kaleidoscopic program featuring a timeless display of perpetually evolving psychedelic viewscapes. Users may interactively manipulate over thirty image-creation algorithms, or set the program to automatically generate hours of dynamically morphing displays of colorful patterns and geometrically complex graphics.

Continue Reading