Go to the Stanford University web site
or
Log In
(To add something to the Commons.)

Web Development

How to Tell if you are using a Reverse Proxy

To determine whether your virtual host / subdomain is hosted on the WWW servers or on the proxy servers (legacy), run the following comman on the command line:

host myvanityurl.stanford.edu
from a Terminal window.
If it returns:
proxy-service.best.stanford.edu
then it's on the proxy servers.
If it returns:
www-v6.stanford.edu
then it's on the www servers.

Website Redesign Checklist

Overview

This checklist is intended to help small departments assess their needs for website re-design and leverage as many Stanford and low-cost opportunities as possible.

The "Roles" section lists all of the potential roles in an ideal redesign. Some of these are areas of focus rather than actual job titles, but each could easily take up a great deal of time. With a small staff, some individuals will fulfill several roles, and some roles will be filled by outsiders.

Direct PHP errors to a log file of your choosing

Thanks to John Bickar for the code below.

Developers working with sites on www.stanford.edu don’t get direct access to Apache’s error log. To troubleshoot your PHP applications, you can create a local php.ini file with the lines below. This will redirect PHP errors to a file of your choosing. Make sure to remove these lines and the file containing the errors once you are done troubleshooting to avoid disclosing the internal workings of your application.

Show git branch in bash prompt

It's considered good practice to create feature branches in git when working on new functionality. The problem with this is that knowing which branch you are in is not obvious. Pasting the following into your .bashrc file will display the current branch in your prompt.

Simple Git Fast Forward

If you get the befuddling message:

Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded

you can just run:

git pull

Or, if that doesn't work:

git pull origin master

(I think.)

The above might seem obvious to some, but Googling "git fast forward" proved surprisingly unfruitful. HTH.

Boost

Overview

Boost "provides static page caching for Drupal enabling a very significant performance and scalability boost for sites that receive mostly anonymous traffic". With the move of proxies to the WWW servers (January 2012), it is possible to install and configure it in the Stanford Leland web environment.

Benchmarking Site Performance with ApacheBench

ApacheBench (ab) is "a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server." It is built in to most current versions of Mac OS X and Linux. It's a quick way of sending multiple requests to a website and timing how long they take.

Basic Test

At its most basic, ab can perform successive and/or concurrent load tests on a webpage. Run the following command in the Terminal (Mac OS X; if you don't have OS X, ab is installed on the corn cluster machines):

Qualitative Website Usability Testing

A couple of months back we'd posted to su_webmasters asking for advice / suggestions / ideas for conducting web usability tests. We're grateful for all the suggestions we received -- thank you for those!

We wanted to follow up with a quick recap of what we ended up doing, and how it went.

Goals
Conduct qualitative usability testing on our ECorner website (ecorner.stanford.edu) to gain insights on the general usability of the UI.

Virtual Host for Foswiki / TWiki wikis

Using a vanity URL / virtual host address like http://mysub.stanford.edu with a Foswiki is pretty straightforward. Assuming that your Foswiki installation's view script is at http://www.stanford.edu/path/to/cgi-bin/wiki/bin/view, then

MediaLinks Style Sheet

MediaLinks Style Sheet

Developed by John Foliot / Stanford Online Accessibility Program (http://soap.stanford.edu)
Released under Creative Commons Attribution-Share Alike 3.0 United States License

NOTES:

This is an additional stylesheet (medialinks.css) which can be incorporated into Drupal (or used stand alone) that does some checking of links based on file extension type, and add an appropriate icon after the link showing the file format. For example, a link to a PDF file will auto-magically also show a Acrobat icon directly after the link, as part of the link; current formats supported include PDF, DOC, DOCX, XLS, and PPT. It also has a new CSS authoring class called “external” which also provides an icon after a link, indicating that it is a link off of the current site.