Sep
28
Simple Trick for Avoiding Cached CSS Files

When implementing changes to a website design, often fundamental changes are made only to a site's CSS file. Perhaps you're tweaking font spacing, adjusting margins for sections of a page or making significant layout changes. One problem that comes up when testing designs is that browsers like Firefox and Internet Explorer tend to cache a CSS file, making it hard to know whether intended changes actually work. For users, getting a current copy of the (X)HTML file may still mean you get the 'old' CSS file.

By passing a variable as part of the CSS file, this can help avoid the problem. Here's an example:

<link type="text/css" xhref="http://www.stefanhayden.com/style.css?version=1" rel="stylesheet" />

This tip was featured recently on the site: The Do's and Don'ts of Modern Web Design, which provides short posts describing best practices and things to avoid in creating websites. As the site's subtitle states, these are "Snacksized Web Design Tips and Tricks." The site makes each available with a retweet function to share them with your world of followers.

Online, the technique of the CSS Caching Hack dates back to (at least) 2006. It's a nice trick to keep in mind, and we'll be using it for some site adjustments we're planning for the law library.

Aug
20
Audience-Oriented Menu Options

The Georgetown Law Library site uses a horizontal navigation bar for access to most sections of our site.  We introduced it with a redesigned site in January 2008, and people seem to like how it works.  In the course of conversations and a usability study this past Spring, we noticed that people sometimes pause, trying to decide which of five broad menu selections to choose.  We recently made a small change intended to make it easier for students and faculty to find what they need.  The audience-based items on our sitewide navigation are now in a different color, grouping them together visually.  Compare the difference:
Old:
Old navigation bar
New:
New Navigation Bar
Following are two law schools that indicate different types of menu items for different audiences

Harvard Law School


Cornell Law School Library:

Aug
20
Selective Enhancement: Border Radius

In the world of web design, there's a concept known as "Progressive Enhancement" The basic definition on Wikipedia is as follows:

Progressive enhancement is a strategy for web design that emphasizes accessibility, semantic markup, and external stylesheet and scripting technologies. Progressive enhancement uses web technologies in a layered fashion that allows everyone to access the basic content and functionality of a web page, using any browser or Internet connection, while also providing those with better bandwidth or more advanced browser software an enhanced version of the page.

Today we updated the homepage at the Georgetown Law Library to include rounded corners for browsers that understand them. This doesn't add functionality, and it is no more advanced than it was. Given this, it seems more like "selective enhancement". We've selectively enhanced things for people using Safari or Firefox, while leaving Internet Explorer users with angled corners.

Compare the difference:
On a browser that interprets rounded corners:

On a browser that ignores this property:
square radius border

For our own documentation, the corners are done with the CSS Property -moz-border-radius.

-webkit-border-radius: 6px; -moz-border-radius: 6px;

There are dozens of alternative methods of creating rounded corners, some requiring images, some with JavaScript, and some in pure CSS. For us, we decided that it's enough to selectively enhance the experience of visitors. Maybe it's a way for us to show that Firefox users tend to think outside the box (pun intended).

 

May
21
Adobe InContext Editing - Last Stop Before a Full CMS?

Unless you're running a one-person blog or website, there is always a need for distributed content management.  The worst-case scenario with web management is that everybody emails changes to one person to post them online.  It's inefficient and it is no fun to be that content funnel. A better model is to give content editors tools they need to make changes themselves.

Adobe just updated the InContext Editing service, which is a system of distributed content management that could fill the gap for anybody not yet ready for a full web-based CMS. This is technically a product from Adobe, but it may be better described as a service, as it looks to be positioned as an entirely web-based subscription model for editing web content. InContext Screenshot

InContext editing is a web-based system that lets web developers give users the ability to edit content directly within the browser. Unlike Adobe Contribute, InContext Editing does not require a desktop software installation. It isn't as feature-rich as Contribute, but the Live Demo of InContext Editing shows that simple text editing is possible without much trouble. InContext Editing requires Adobe Dreamweaver CS4 to take advantage of all features, so this option ties you to the latest incarnations of Adobe's good (and not inexpensive) software tools.

[More]

Feb
26
New Web Screenshot Showcase - 32,000 Images and Growing

The distributed screen capturing website BrowserShots.org recently released an online showcase of more than 32,000 image captures of website pages.  It looks like the content comes from sites their visitors have requested to have pictures taken of. 
Example of hovering over a page display

You can browse sites, rate them, and search for text within the sites.  It's not clear if the text searches indexed terms or a version of the site source code.  For random design inspiration, this is a great site.  Another search option is to look for sites of a particular color.  For instance, here's a view of sites matching the hex color 003366.
Hex Color Search 003366 example
It's especially nice because it includes many non-English sites, so you can just isolate design and feel without reading text. 

As an aside, if you need to get lots of screenshots for websites, it is very much worth it to pay for priority processing.  We needed to collect lots of images in a short period, and with priority processing, images were returned in one or two minutes.

Jan
15
Sliding Panels for Maximum Content in Fixed Space

On the law library's website, we have what's called the Feedback Blog.  This is a place where we post questions from students and any of our visitors, together with answers to those questions.  It's an informal dialogue of sorts, styled in a Jeopardy type fashion, where every post has to be in the form of a question.

On our library homepage, we present the one question and the first 100 characters of the answer to give a fragment of our response.  One problem with this approach is that we only have enough room for a single question.  As soon as a new question is posted, the most recent one disappears.  Instead of just listing more questions, we chose a sliding panel widget so people can page through recent questions and answers without leaving the page or forcing the page size any bigger.

Implementing this was pretty easy with Adobe's Spry Sliding Panel Widget. We went right to the Sliding Panels Sample page and reverse-engineered the code for a horizontal panel. A few checks in the documentation and some testing, and it's ready to go. Of course, it might have been better to read Adobe's entire explanation on Building a Spry Sliding Panels widget, but the code is pretty easy to figure out.

Now there's just one problem: IE6 works with the code, but it displays the widget box strangely. The problem is that IE6 doesn't render the CSS rule max-height properly. In fact, it flat-out ignores it.

Take a look at how it shows up in IE6:
Internet Explorer quirk displayed
We could have fixed this problem with a proprietary Internet Explorer trick such as this or this. The only problem is that it just seemed wrong to add bloat and hacks to the homepage, just so IE6 would look pretty. A quick check of Google Analytics shows that just over half our our users browse with Internet Explorer. Of those, less than a third use IE6. Given these numbers, we figured it was fine the way it is.

Web design site Smashing Magazine lists this technique, which they call Carousels (slideshows) as one of the Web Design Trends for 2009. It's nice to be trendy now and again. Oh, and it's even nicer to add functionality with little code and no loss of screen real estate.

Dec
22
In-Browser Web Editing: Not Just for Firebug and Web Developer Toolbar

People who develop websites have probably already heard of Firebug and the Web Developer Toolbar. They are two very popular addon tools for Firefox that let you analyze web content as delivered to the browser.  The beauty of tools like this is that you don't have to leave a page you're viewing in order to debug it or test code.  There's no need to transfer files to/from a server and reload the page.  If you like these two tools, then consider several others profiled in an article from Smashing Magazine called: 15 Helpful In-Browser Web Development Tools.
Tools they profile include the following:

  • YSlow: a tool from Yahoo! that integrates with Firebug to test website speed and suggest ways to improve it
  • Internet Explorer Web Developer Toolbar: A Microsoft program similar to the same addon for Firefox
  • FireShot: A tool for capturing and analyzing parts of images delivered to the browser, falling somewhere between Screengrab! and Snagit in terms of features
  • Fangs: A free screenreader tool to test oral rendering and navigation of websites (similar to the commercial product "Jaws")
There's some overlap in features between the programs profiled.  For instance, the toolbar from chrispederick.com includes color analysis options similar to those in Colorzilla (for color palette analysis). Nonetheless, it's nice to see a list of these tools that include addons for Internet Explorer, Opera and WebKit (aka Safari / Chrome).  Firefox isn't the only browser that supports in-browser editing, afterall!
Hat tip: Boagworld podcast (which mentioned the Smashing Magazine article).

Nov
10
CFPresentation and CFFEED Proof of Concept Demonstration

One of the powers of the ColdFusion 8 tag CFPRESENTATION is that you can create presentations from dynamic database queries. A type of query introduced in Cold Fusion 8 is the CFFEED tag. This takes a feed (rss or atom) and turns it into a query that you can loop over as needed. Pairing the two together, following is a simple proof of concept that shows a series of slides using an RSS feed as the source.

The source for this example is a feed of Recently Redesigned Websites from the site eduStyle: Inspiration for Campus Web Designers. This was chosen as the source, as the feed output is very uniform, presenting two screenshot images and minimal but predictable text in the source of the feed.

First off, following is the pertinent code showing only the necessary CFFEED and CFPRESENTATION elements:

<!--- Select an RSS source for the CFPRESENTATION demonstration --->
<cffeed action="read" source="http://feeds.feedburner.com/RedesignedSitesFromEdustyle" query="qryEduStyle">

<!--- Using the RSS source, output content into a series of presentation slides.
Limit query to 15 rows to reduce processing time --->

<cfoutput maxrows="15" query="qryEduStyle">      
   <cfpresentationslide
title="#title#"
presenter="ColdFusion 8"
    duration="8">

<h1>#title#</h1>

<div>#content#</div>
</cfpresentationslide>
</cfoutput>

With this, it generates 15 swf slides, each representing a single entry from the feed source. If I want to do this in a week or a month, all I have to do is re-run the ColdFusion file and it will get results live from that point in time.

The best way to view this is to view the demonstration in a new browser window.

Alternately, you can also view an inline version of this presentation here.

Nov
10
Useful CFPresentation Tips and Resources

One of the tags introduced in ColdFusion 8 is CFPRESENTATION, which allows you to create a Flash-based presentation that is very slick and can take full advantage of many ColdFusion tools. Also, once created, it's easy to tweak the content and render it anew.

For a recent talk I had to give, I used CFPRESENTATION mostly to learn more about it. Following are five tips from others trying this out, together with some thoughts about those considering it. In a separate post, I'll put up a simple proof of concept to show how it works.

Five Useful CFPRESENTATION Tips

  1. Adding Attachments to a CFPresentation: As a mostly undocumented feature, you can add attachments to a presentation very easily. Attachments can be web links or file references
  2. CFPresentation: Presenter image tips: design suggestions for including presenter photos and a logo in your presentation
  3. Cool-feature-in-CFPRESENTATION: CF Guru Ray Camden shows a technique for storing presentations for offline use. I found that it works to set the directory path in the intro and then copy these from the server.
  4. Tweaking CF 8 Presentations: Ben Forta points out tips on where to tweak some internal settings for a presentation done with CFPRESENTATION
  5. Creating Slide Presentations: Adobe documentation and examples for creating a presentation with this tag

In my opinion, it's best not to think of this as a PowerPoint alternative. Instead, it's a slick way to create online (or offline) presentations where you want to include live content or render slides in a customizable manner. Output for presentations is stored as a series of SWF files. For this reason, don't expect to include hypertext links on your slides, as they won't work.

The rendered content is not as easy to control as standard web markup. When CFPRESENTATION converts images of webpages, it resizes everything to fit in a single screen. For this reason, slides with minimal text show larger type. Also, image presentation is a bit quirky. For example, I was unable to insert a JPEG in an HTML table with a width of 50% to balance text and graphics.

All in all, CFPRESENTATION is pretty useful, and it sure looks nice for the amount of code required (which is very minimal).

Nov
06
Microsoft puts Some Oompf into Microformats

Oomph logoInternet Explorer users have a new tool to make use of Microformats even easier. The tool is called Oomph: A Microformats Toolkit, which was released as test software. Once installed, this runs as an addon in Internet Explorer to recognize pages that contain contact information or event details marked up with Microformat code. Then a nice little microformat icon shows up and you can interact with the data to save contacts to your address book or put events on your calendar.

Read more about the new tool in a blog post Microsoft and Microformats from John Allsopp, who literally wrote the book on microformats.

Here are some pictures:

Some screenshots of demonstrating microformat interaction in Internet Explorer.

You can already take advantage of microformats, even without creating them yourself. For instance, you might find events in Yahoo! Upcoming and add them directly to your calendar. Or you can search Google Maps or Yahoo! Maps and add them to your phone. There's a strange limitation to Yahoo! and Google address mark-up however. They don't include phone numbers or zip codes. I think this is by design and not a mistake. It's still pretty useful though.

Firefox users should still rely on the Operator Addon. Operator recognizes more microformats than Oomph, and there are more debugging tools for developers.

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9. Contact Blog Owner