CSS font stacks, developer FAQs & 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

Meta description output for new FAQ answers, 25th October 2008

Added a standard meta description output to the FaqMenuGenerator class to include in all FAQ pages. Updated the abstract description text for all FAQ sections before regenerating the pages with new FAQ answers.

HTML & XHTML

Java objects

Java threads

Sponsored links

Text ads

Web site manager

Made some amends to the faq_sort_categories.sql SQL script to ensure FAQ sections and categories are sorted by their sort index by including the sort_index values in the output with a substring of the section and category names to keep compact single line rows:

SELECT section.sort_index as s_index,
       substring(trim(section.section_name), 0, 20),
       category.sort_index as c_index,
       substring(trim(category_name), 0, 20);
      

Created some working draft call to action includes for the search engine optimisation and Apache custom error pages articles to include on the Site Manager index page.

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

Local navigation link list priority, 23rd October 2008

Re-arranged the sequence of local navigation link lists in the Web font sampler, CSS media monitor, Java & servlets and site log subsections to put the most popular links towards the top according to Google Analytics figures.

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

Experimental feedback form Preview servlet, 18th October 2008

Created a new working draft Preview servlet to stand between form submissions and the handler script. The ultimate aim is to log client details and restrict submissions based on content, frequency and possibly exclude by IP address. Added new methods to the HttpRequest class to handle POST requests and incremented the client user agent to version 1.2. Added new fields to hold the request method name and request body for POST requests. Created a new constructor with request body argument and updated the original constructor to chain to it. A non-empty request body implies a POST request. The configureConnection() method then sets the request method and enables output:

connection.setRequestMethod(method);
connection.setDoOutput(true);
      

The HttpRequest class' private connect() method includes a call to a new sendRequestBody() method after the connection is made. The sendRequestBody() method sends the bytes of the request body to the connection as part of the POST request. Also added a main method to test HTTP requests on the command line and pass the response back to System.out to check against the EchoRequest servlet.

Corrected some bad links in recent site log entries and archived the August 2008 entries. Also corrected a reference to Apache custom error 500 pages in the meta description for the custom error 400, bad request page.

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

Latest font survey results, 12th October 2008

Latest: Build a better CSS font stack with our font survey results:

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

Font stack builder XML data import, 11th October 2008

Created a new SurveyResults class as an extension to the existing AbstractXmlObject class that parses and populates itself with survey results data in XML format, the same XML that is transformed to produce the HTML font survey results tables. The class serves as its own SAX ContentHandler, DTDHandler, EntityResolver and ErrorHandler. ContentHandler interface methods parse the XML contents into a set of FontFamily objects and assign font survey data.

Updated the FontStats.dtd to add an optional generic font family element to the row elements:

<!ELEMENT row (platform?,class,fontname,frequency,imagename,generic?)>

<!ELEMENT generic (#PCDATA)>
      

Added a new entry to the ResourceResolver class for version 1.1 of the Font stats DTD: "-//Code Style//Font stats 1.1//EN". Also clarified some of the conditional logic in the class.

Switched the former SortedMap of FontFamily objects in the FontStack servlet for the new SurveyResults object and created a new initialization method to load the font survey XML through it. Altered conditional statements in the servlet to use the SurveyResults getFontFamily(String) and getFontFamilies() methods.

Corrected a bug in the Font stack builder generic font family selector form where spaces before the font names in the comma separated stack list were failing to match the master font family names and clearing the stack. Changed the listing call to the URL encoded version and added a clause to the getFontFamilyList() method to URL encode the font family name too. Also added calls to URL encode the font names in the move up, move down and delete links.

Added the full font survey results XML file to the local and remote Ant filter files for application deployment. Ant applies the filters to the servlet container configuration to set the initialization parameters for the Font stack builder. Also added the preferred SAX parser configuration to the servlet configuration, currently using Apache JServ:

wrapper.bin.parameters=-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
      

Brought DBResults up to coding standards for JavaDoc comments, final variables, call to super() and conditional logic. Added a Locale to the SimpleDateFormat for the survey results.

Updated the font stats DTD version number in FontStats servlet and added the fontfamily.generic field to the set of SQL bindings for XML output. Re-arranged the database Connection acquisition so that the release of the connection is in a finally statement block.

Added setModifiedTime(long) and getModifiedTime() methods to the AbstractTemplateServlet class so that the font stack builder servlet can set its own custom modified time. Updated the FontStack servlet to set the modified time based on the SurveyResults getSurveyDate() method. This is the modified date for any given font stack request URL.

Split out "no keywords" versions of Site Manager section and sub-section head element include files to optimise keywords for Apache custom error pages and search engine optimisation articles more specifically. Followed a process of keyword analysis using Google Analytics entrance keyword and bounce rate data with the Google AdWords Keyword Tool to choose the optimum keywords per page, the subject of a forthcoming article, sticky keyword optimisation.

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

Numbered actions for font stack builder, 9th October 2008

User feedback suggested the addition of task sequence numbers to the generic font family selector and font family selector headings on the FontStack servlet interface. The generic font family selection is not necessary, but makes font family selection easier because it narrows the fonts listed in that select list.

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

Related links styling for validation articles, 4th October 2008

Moved the JTidy development notes call to action include file to the JTidy sub-directory. Created a new related links format for the JTidy and Validate your markup with NSGMLS articles using a MenuBox class div. The calls to action have h2 headings with NewSection class, so added a more specific selector to override the extra spacing and the double border:

.MenuBox .NewSection {
  padding-top:      inherit;
  margin-top:       inherit;
}

.MenuBox .NewSection {
  border-top:       none;
}
      

Added a NewSection class attribute to the SelectORacle sub-heading in the Code Style CSS article.

Updated text ad prices and customer discounts with changes to customers' subscription modification URLs. Added a "Top sites that link in" link to the text ads service and sponsored link service benefits box outs.

Completed site log update for September and archived July 2008 entries.

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