Optimizations and HTML5 support

7 views
Skip to first unread message

Tim Moses

unread,
Sep 2, 2010, 6:28:04 PM9/2/10
to Sitemason Developers
If the optimizations below look suspiciously familiar to you, they
were prompted by the HTML5 Boilerplate site http://html5boilerplate.com/
. It's a collection of common optimizations and hacks to help sites
work more efficiently and more predictably. I also used Safari's built-
in audit, which is probably built from Google's Page Speed, which was
based on something Yahoo did. It tries to point out things in a site
that could be set up in a more efficient way. In my case, it was also
good for catching things I thought I had already addressed in
Sitemason.

Optimizations in Apache
More file types are gzipped on the fly - The web server compresses a
lot of standard files on the fly to speed transfer times. Now it does
it more.
More mime types have been added for embedded fonts - The main types
were there, but now a more complete set is in place. Check
http://www.fontsquirrel.com/fontface/generator for info on embedding
fonts in your site.
Mime types have been added for more video formats used by browsers
with the HTML5 video tag.
Internet Explorer is now forced up to the latest renderer or
ChromeFrame for all sites automatically.

Optimizations in the PHP Library
Added printBodyTag() for including browser-based classes - This is a
great way to handle browser-specific incompatibilities without using
CSS or Javascript hacks or having to load extra CSS files.
http://developer.sitemason.com/php_library#printBodyTag
Added printInitHTML() for printing appropriate DOCTYPE declarations
and the <html> tag with appropriate schemas included. Among other
things, Sitemason adds Open Graph meta tags when appropriate and this
method references the schema automatically.
http://developer.sitemason.com/php_library#printInitHTML
http://developers.facebook.com/docs/opengraph
Dramatically sped up getXML() for SideContent - This is significant
for pages that pull in a lot of extra content.
Reduced the number of Sitemason CSS files to one for faster page
rendering.
Moved the loading of some Javascript libraries to the bottom of the
page for faster page rendering.
Most Sitemason supporting files, like Javascript libraries, css, and
images are referenced locally to prevent extra hostname lookups - We
use to call these with a full URL to www.sitemason.com. Now, they are
called from within your site under the virtual /.sm directory.
printContent() got a lot of new options. They aren't optimizations,
but they do give you a lot more flexibility.
http://developer.sitemason.com/php_library#printContent

More HTML5 Support
Using HTML5 form field types when appropriate - Few browsers support
this yet, but mobile Safari will give you custom keyboards based on
type. I hate having my email address auto-capitalized in a form field.
Here's a nice explanation of HTML5 forms and the current level of
support in web browsers. http://diveintohtml5.org/forms.html
Using HTML5 rel attributes on Sitemason generated links - I think
this has a full listing and what they are for. http://www.w3schools.com/html5/att_a_rel.asp
Reply all
Reply to author
Forward
0 new messages