CSS font stacks, media style sheets & web standards

Your banner ad here

In this section

Follow Code Style

Site navigation below

This page is part of a searchable archive of the Code Style site log. Technical implementation notes that shed light on when, why and how the site has evolved since 2000.

RSS news feed Follow the latest entries to the site log.

Reverse chronology

Section newsletter and news feed subscriptions, 31st January 2009

Created new section-specific newsletter sign-up and news feed listing pages by creating server side include chunks from the existing all-in-one pages, so all pages are maintained from the same source. Created a new RSS standfirst include, and table of contents "TOC" includes for the RSS news feeds. Updated all section and subsection local navigation includes to reference the relevant local newsletter and news feed listing pages and created new navigation includes for the Code Style, Apache and Site Manager sections.

Updated all pages in the HTML & XHTML section with a "no keywords" head include version and per document sticky keyword optimisation. Also used the SEO Quake keyword density tool to pick out new keywords and prioritise with Google Keyword Tool figures.

Started creating section-specific HTML newsletter and HTML news feed pages. Added standard 14 pixel news feed icon to the new working draft of the HTML section local navigation boxout. Split out the opening segment of the newsletter sign-up form as a server side include to re-use on all local versions of the form. Created a separate include for the font survey newsletter sign-up, not generated by the MailingListTemplate class.

Created string constants for the list type labels in the MailingListTemplate class and changed labelling to "newsletters" instead of "mailing lists". Created a more stand-out fieldset to contain the submit button for each mailing list segment. Adjusted mailing list subscription data tables to 69% width to match standard elsewhere.

Added new "At a glance" links to custom HTTP error pages. Added the new section newsletter and news feed pages to site map.

Actions: Ask a question about this post, seek clarification or offer a correction.

FAQ includes in form confirmation pages, 30th January 2009

Added FAQ search and FAQ section menu includes to the foot of all Soupermail form confirmation pages to encourage follow-on actions after people have submitted forms.

Actions: Ask a question about this post, seek clarification or offer a correction.

Font survey email removal script, 21st January 2009

Created a new fonts_remove_user.sh script to delete bounced email from any of 3 font survey database tables. The script passes the email address as a parameter and calls psql with the UPDATE and DELETE commands as appropriate.

Actions: Ask a question about this post, seek clarification or offer a correction.

Distinct document titles and URLs for SEO, 17th January 2009

Changed the output of the FontSurveyTable.xsl to URL-encode spaces in font name parameters with + instead of %20. This will make the URLs in the font survey results tables the same format as those generated for the generic font family results tables, so they are not seen as different pages by search engine spiders.

Added a new getHeader(String title, String header, LinkSet styles) method to the Presentable interface to pass a distinct document title and page heading with custom CSS link set. Updated the CodeStyleTemplate and ErrorTemplate classes to implement this method and added @return JavaDoc comments and various other minor code style enhancements.

Added a new String getSampleTypeTitle() method to the Java Sample interface with distinct implementations in TextSample, ImageSample and CompareSample to distinguish the HTML title elements for the different types. Adjusted the output of the FontSampler class to use the supplementary title text.

Substituted many string literals in AbstractSample, CompareSample, TextSample and ImageSample classes with string constants in superclass AbstractContent. Cleaned up various commented out text and reformatted long lines. Added @return JavaDoc entries for several classes in the font sampler package.

Latest updates to the Code Style font survey results:

Added "(stub article)" to the document title and menu link output of the FaqMenuGenerator class to distinguish the HTML title contents of premium content stub articles from the actual premium content article.

Adapted the Ant build.xml to copy HTML and XHTML test files in .shtml format to the new Code Style test path. Updated the local.properties and remote.properties files with the amended web test path. Renamed test case files from .php to .shtml to match the scheme on the new Lighttpd service.

Actions: Ask a question about this post, seek clarification or offer a correction.

Lighttpd custom error page amends, 10th January 2009

Updated copyright dates on all HTTP custom error pages and created a new static 404.html page to work around apparent problems with Lighttpd. Removed the server.error-handler-404 command for a dynamic HTTP 404 error page because Lighttpd was also (incorrectly) using this for 403 errors. Switched all to purely static error pages using the server.errorfile-prefix command. Also added "At a glance" boxout menu to all custom error pages.

server.errorfile-prefix = "/home/path/www-docs/errors/"
      

Changed the sequence of mod_setenv and mod_expire modules in the Lighttpd configuration file to test problems adding must-revalidate directives to the Cache-Control headers generated by expire.url directives. The must-revalidate part appears to be clobbered by the expire.url directive. Changed to explicitly set both values with the setenv.add-response-header command instead, e.g.

$HTTP["url"] =~ "^/images/" {
  setenv.add-response-header = ( "Cache-Control" => "max-age=7776000, must-revalidate" )
}
      

Corrected several shell scripts that had been saved with Windows file format to save in Unix format. Had been causing bash "bad interpreter" errors on the Code Style production host.

Created a new LogRotate.sh script to rotate Lighttpd request and error logs via uschedule. Added rotate script commands to uschedule configuration and un-schedule scripts.

Modified page request figures associated with each sponsored link service bands. Included text ad FAQ and sponsored link FAQ question menus in the respective service enquiry confirmation pages.

Actions: Ask a question about this post, seek clarification or offer a correction.

2008 site statistics, 3rd January 2009

Updated site statistics page with 2007 and 2008 comparison figures for most listings. Adjusted sponsored link banner references for all pages affected by the update to the high and medium traffic page classification, including several FAQs. Updated boxout menu labels from 2007 to 2008 statistics.

Added new right aligned text styles for .PerAnnum and .Percent classes for statistics tables:

.SizeData, .Probability, .Controls,
.Percent, .PerAnnum {
  text-align:       right;
}
      

Set the text colour for .Odd table rows to black:

.Odd td {
  background:       #F9F9F9;
  color:            #000;
}
      

Refactored the AbstractProductSelector class to take customer discount keys and values from the ServletConfig object via a new public final void loadCustomerDiscounts(final ServletConfig config) method. Also cleaned up the class' code style with some string constants. Added loadCustomerDiscounts() method calls to subclasses SponsorSelector and TextAdSelector. Removed hard coded customer discount values from CustomerDiscount and default constructor initialisation and updated the Code Style servlets application with new codestyle.jar to enable web.xml based customer discount configuration.

Created a new SQL script to convert .php file references in the FAQ database to .shtml using a reversal of the script used to set them in the first place.

UPDATE section SET boxout_url =
    (SELECT substring(boxout_url from 0 for (position('.php' in boxout_url))) || '.shtml')
WHERE boxout_url like '%.php%';
      

Corrected the PSFTP upload script for FAQs to use .shtml file extensions.

Actions: Ask a question about this post, seek clarification or offer a correction.

Google Chrome compatibility fix for font survey applet, 2nd January 2009

Received reports that the font survey applet was failing in the Google Chrome browser. However, the failure was silent; the Java console showed standard status messages but no exception or stack trace. Added many new debugging statements to the submitSurvey() method to track progress up to the point of failure, dependent on the debug parameter in the applet configuration. Ultimately traced the source of the error and commented out calls to System.getProperty("browser") and System.getProperty("browser.version"). These calls should have failed with a SecurityException if Google want to restrict access, not silently.

Also updated the object element codebase attribute for the font survey applet to the minimum version necessary for Chrome, Java 1.6 update 10 according to Google. (Updated the AnchorPoints: Java and servlets page to link with the most recent autoupdate CAB files for Windows.) Created a new string constant for the FontSurveyApplet default host, www.codestyle.org, and an integer constant for the default HTTP port number to remove a magic number.

Removed lines from the Ant compile.applet target in build.xml that copied the former class package structure to the web directory structure. Changed the local.properties file for the font applet output directory to deploy straight to the new Lighttpd web directory structure.

Added Lighttpd cache control settings for text and XML files to fulfil the unit test for the TrustedHttpBroker class, which requests the live robots.txt file and expects an Expires header value.

$HTTP["url"] =~ ".*\.txt" {
  expire.url = ( "" => "access 6 hours"  )
}
$HTTP["url"] =~ ".*\.xml" {
  expire.url = ( "" => "access 6 hours"  )
}
      

Added PAUSE statements to all Windows batch scripts for running PSFTP file uploads to check the outcome before closing. PSFTP sometimes fails on upload and leaves an incomplete file, see Network error: Software caused connection abort.

Actions: Ask a question about this post, seek clarification or offer a correction.

Previously on Code Style

Find technical implementation notes on all aspects of the Code Style site.

Add this page to your chosen social bookmarking service

Style warning - please read

Home · CSS · Java · Javascript · HTML · Help · Log