Tech notes

  1. IE 7 new features: If you want to use the newly supported features (e.g. fixed) in IE 7, DO NOT use the HTML 4.0 Transitional dtd (aka "loose"). Use XHTML 1.0 or 1.1, or HTML 4 Strict.
  2. SVG issues
    1. Serving SVG(z):Anything bigger than husky_dog_gerald needs to be gzipped pic.svg.gz; it does not seem to be necessary to rename it pic.svgz. For Apache servers: needs an AddType:
      AddType image/svg+xml .svg
      AddType image/svg+xml .svgz
      AddEncoding gzip .svgz
      You could add the following lines in .htaccess which would be useful if the server was gzipping everything it sent (but ours doesn't).
      <FilesMatch \.svgz$>
        <IfModule mod_gzip.c>
          mod_gzip_on No
        </IfModule>
      </FilesMatch>
      	 
      This keeps Apache from double-zipping the file if mod_gzip is on--which it seems not to be on Dante/Homer.
    2. Note that zooming of svg is broken in Firefox 1.5, but not IE7!
    3. Note that the svg files are xml compliant and must have an xmlns in second line as attribute of the element SVG:
      xmlns="http://www.w3.org/2000/svg"
    4. Some of the free images from openclipart.org have a huge amount of apparently proprietary hexcode crap in them, which presumably makes them editable in Illustrator, but is completely unnecessary on the Web and should be removed, manually, probably.
  3. xhtml issues:
    1. Given that our templates are usually xhtml1.1 and you might want to serve them as proper application/xhtml+xml, you either need to give them the extension .xhtml or put them in a special directory (say "xhtml") and add an .htaccess to the subdirectory saying:
      RewriteEngine on
      RewriteBase /
      RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
      RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0
      RewriteCond %{REQUEST_URI} \.html$
      RewriteCond %{THE_REQUEST} HTTP/1\.1
      RewriteRule .* - [T=application/xhtml+xml]
      
      This tells the server to identify the MIME type of the file as application/xhtml+xml even though it has an .html extension. Note however that a simple .xhtml works by itself for Firefox, but the IE series don't recognize it; they will pop up an "what do you want to do with this?" screen, and if you say Open, they will have a go at it.
    2. You can tell crudely if the server is serving .xhtml by breaking it and seeing what you get (say, removing an </p>). Or, less crudely, by pasting the url into Web-Sniffer
  4. the q element: CSS2 includes an element q for marking quotations. Firefox supports this as it should by displaying <q> as “ and the </q> tag as ”. Also, elegantly, it will automatically display a q' inside another one as a singly curly (or slanted--if sanserif) ‘. Unfortunately IE, even IE7, does not support this, and simply ignores q. Not a good idea to use q; if you want curly ("smart") quotes, put 'em by hand (double opening quotes are "ldquo", double closing ones are "rdquo", single opening are lsquo, and so on. --these are character entities). Test for support: She said, Eggplant! quite loudly.

    Or, you can brute-force ldquo and rdquo with &#8220 and &#8221: “If anyone cares,” she muttered wearily.

    Stephen Poley has a nice little sed script for converting the inch and aspostrophe quotation marks into the smart pairs.

  5. The target attribute is not legal in XHTML1.1 (or in HTML 4 strict). What to do? Use a version of winpop:

      <a href="filename.html" 
       onclick="window.open(this.href); return false;"
       onkeypress="window.open(this.href); return false;">
    

    This does not handle the use of target with base, which is used, for example, on the Calendar page. In any case, if you go to this much trouble, why not at least locate it with an offset on x and y?