Not the most interesting title, but “oh well”.. Recently, a reader named Alison left a comment requesting help with a particular htaccess trick. She wanted to know how to permanently redirect (301) all requests for a specific page when requested from a specific IP address. In other words, when a visitor coming from 123.456.789 requests the page requested-page.html, the visitor will be redirected to just-for-you.html. All visitors not coming from that specific IP address are not redirected, and thus will […] Continue reading »
Clean, easy, effective. You don’t need no stinking JavaScript to preload your images. Nope. Try some tasty CSS and (X)HTML instead! Here’s how to do it with only two easy steps.. Step 1 — Place this in your CSS file: div#preloaded-images { position: absolute; overflow: hidden; left: -9999px; top: -9999px; height: 1px; width: 1px; } Step 2 — Place this at the bottom of your (X)HTML document: <div id="preloaded-images"> <img src="https://perishablepress.com/image-01.png" width="1" height="1" alt="" /> <img src="https://perishablepress.com/image-02.png" width="1" height="1" alt="" […] Continue reading »
If you think you understand the logic behind Microsoft’s downlevel conditional comments, you are sadly mistaken. Sure, they seem simple enough on the surface, but as you really try to wrap your head around how and why they work, the subtle complexities of downlevel conditional comments may leave you dazed and confused… In our previous article on Internet Explorer’s exclusive browser-detection method, downlevel conditional comments (DCC), we present an introductory exposition, defining expressions and providing several generalized code examples. Overall, […] Continue reading »
Even with all the fancy-pants new features found in Windows XP and now Vista, Microsoft Windows 98 (Second Edition) remains our favorite Windows-flavored operating system. We love it so much, we still use it on one of our trusty laptops. Over the years, we have discovered several very useful functions available via the command line or even the “Run” prompt (Start → Run…). Anyway, without spending too much time researching or explaining these wonderful tools, we figured posting the information online may […] Continue reading »
For those of us running Apache, htaccess rewrite rules provide an excellent way to block spammers, scrapers, and other scumbags easily and effectively. While there are many htaccess tricks involving blocking domains, preventing access, and redirecting traffic, Apache’s mod_rewrite module enables us to target bad agents by testing the user-agent string against a predefined blacklist of unwanted visitors. Any matches are immediately and quietly denied access. Continue reading »
On Unix systems, a symbolic link refers to a file that points to another file or directory. Symbolic links serve as powerful tools for web designers and developers. Using shell access, creating a symbolic link requires only one line of code: ln -s /home/username/public_html/directory1 /home/username/public_html/directory2 Simple enough. Assuming you have access to the linux shell. Unfortunately, many shared hosting environments deny shell access. Fortunately, creating symbolic links — also called “symlinks” — remains a possibility via the PHP symlink() function. […] Continue reading »
After studying Peter Kent’s excellent book, Search Engine Optimization for Dummies, several key methods emerged for optimizing websites for the search engines. Although the book is written for people who are new to the world of search engine optimization (SEO), many of the principles presented throughout the book remain important, fundamental practices even for the most advanced SEO-wizards. This article divulges these very useful SEO practices and organizes them into manageable chunks. Continue reading »
The target attribute for anchor elements (<a></a>) specifies the location in which the referenced document should load. For example, to open a link in a new window, we would use a target value of _blank. Although this is a commonly employed technique, the target attribute has been deprecated by the W3C and is not valid (X)HTML. Regardless, the target element remains a useful tool for practicing designers and developers. Here, we present the attribute values for the target element: Continue reading »
Coming soon to the World Wide Web: Everything. The perpetually evolving sum of human knowledge available online. Anywhere. Anytime. So, what are you looking for? Information concerning something, somewhere, about somebody.. You know it’s there somewhere. Sure, you could waste time by digging through that immense labyrinth of browser bookmarks, maybe eventually finding that one link that may or may not lead you to the page that you remember.. No thanks. The Web is far too rich in information to […] Continue reading »
This quick tutorial explains how to use HTML, JavaScript, and/or PHP to enable visitors to “go back” to the previous page. You can use either method to add a simple “go back” link or form button to your web pages. Continue reading »
Note: The methods described in this tutorial apply to older versions of Internet Explorer (version < 6) and Outlook Express (version < 6), and are provided here for reference and historical purposes only. Continue reading »
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 »
URLs frequently employ potentially conflicting characters such as question marks, ampersands, and pound signs. Fortunately, it is possible to encode such characters via their escaped hexadecimal ASCII representations. For example, we would write ? as %3F. Here are a few more URL character codes (case-insensitive), for easy copy/paste reference. Continue reading »
This brief tutorial on hiding content applies to Windows 95, 98, and 98SE. Although this method may be old hat or even irrelevant to the more experienced Windows users, I have found it useful on a number of occasions, and therefore think it’s worthwhile to share here at Perishable Press for future reference. Continue reading »
Note: This article assumes a basic familiarity with the DOS command prompt, and is somewhat of a continuation of our previous article on DOS, Basic DOS Commands. Here, we are exploring a few of the more interesting commands available via the DOS command prompt. For a more complete reference please consult the Windows Help file (Windows XP) by entering the following command at the command-line prompt (or via the Start > Run… dialogue box): Continue reading »
Ahh, the fun I have at work while experimenting with the command line. I will be the first to admit that I understand very little of DOS, especially when considering the scope of its functional capacity. Nonetheless, I am taking the time to chronicle a few interesting DOScoveries here in this article, as well as in at least a couple of others (see related articles section at the end of this article). Continue reading »