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
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).

 

Sep
12
Improving Options for Finding Course Materials: Custom Banner on TWEN

Beginning this year, several faculty members at Georgetown Law have started using the course management system TWEN (The West Educational Network).  Students can also find course materials on a courseware system developed in -house several years ago.  In addition, there are some reserve materials available in the library, and syllabus materials are distributed through a centralized service.  Because having so many options can be confusing to our students, we try to link to all services at the same time.  On websites we manage, this is easy enough, so we can provide course information links on a main student page, an orientation page designed for new students, and other places. Westlaw recently added a feature to TWEN to let law schools customize a banner on the system.  In addition to providing a logo and link back to the law school, there's enough room to include a few links.

To allow us to include several links, we looked at setting up a dropdown menu with categories of links.  While letting us provide course information sources in one place, this also lets us link to services like Hein Online and our E-Journal Finder, which provide important course materials not found on Westlaw, the quasi-default source for legal information on TWEN.  Here's what it looks like:
 

This menu uses a version of the something called the Sons of Ursidae Menu (thanks Sara K!) which requires no JavaScript and can be rendered with only a few lines of CSS code. The dropdown menus don't work in Internet Explorer 6, but the four links under the Georgetown logo point to pages that contain all items.  We're going to look at changing our main site navigation menu (which uses Open Cube's Infinite Menus), as it requires more complex CSS and complicated JavaScript.

One interesting thing about our custom menu is that Westlaw's blue and grey color scheme match nicely with the school's main colors.

Sep
10
hCalendar Microformat: Better Than vCal?

There is much hype written about the semantic web, which is supposed to add context to content online, aiding computers and humans in better understanding information presented online.  One area where it's fairly easy to add content and context is by using microformats. This is a way to mark up information online so other applications can recognize events, contact details or reviews.  The mark-up is in the form of a common set of class codes that do nothing to change visual display, but can be read by computer programs recognizing this format.

We recently created a faculty events system for tracking on campus workshops and conferences.   For all events, we create a vCalendar file (used with a .vcs file extension) for import to programs like Microsoft Outlook and Entourage.  The problem is that Firefox and Internet Explorer handle .vcs files differently, forcing some users to first download the calendar file, then import it to another application. Also, .vcs files are not easy to import to services like Google Calendar.

Thankfully, we mark up all events with the hCalendar microformat, which contains all event details, even some not visible on the screen.  The easiest way to take advantage of this markup is to use the Operator Toolbar, which is a Firefox extension. This recognizes the hCalendar format, and lets visitors save items directly to Outlook, Google Calendar, Yahoo Calendar and other places.  The picture here shows the Operator toolbar in action.


Jesse Rodgers, a web developer at the University of Waterloo has written about How can Microformats help Higher Education, pointing out that and their university has an events system that has all events marked up with microformats.  It looks like they have decided to forego creating downloadable calendar files (e.g. vCal or iCal) altogether. Read Rodgers' research paper on microformats in higher education for a literature review on the topic, as well as a model for implementing microformats.


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