John Cox

Blogs · @wyome

Tagged tutorial · everything

HTML5 Rocks - Improving the Performance of your HTML5 App

Smoothness in web animations depends on consistent frame rates rather than high absolute fps—true 30 fps is preferable to 60 fps with dropped frames since users perceive jaggedness. The article provides techniques for improving animation performance through GPU acceleration, CSS transitions, proper DOM interaction patterns, and profiling strategies that identify bottlenecks in JavaScript and browser rendering cycles. Key optimization tactics include caching DOM nodes, batching DOM reads and writes, using CSS transforms instead of position changes, and leveraging requestAnimationFrame for JavaScript animations.

Permalink

The Current State of HTML5 Forms · Wufoo

HTML5 introduces new form input types (email, tel, color, date, etc.), attributes (placeholder, required, pattern, etc.), and elements (datalist, meter, progress) designed to improve both development and user experience, though browser support varies significantly across vendors and versions. The document provides detailed compatibility tables showing which features are supported in major browsers, along with practical guidance for testing support, using JavaScript methods for form manipulation, and applying CSS styling to HTML5 form elements. Even when support is incomplete, these features degrade gracefully in older browsers, functioning as text inputs while still allowing developers to enhance modern browsers.

Permalink

Untitled (http://27.org/isocountrylist/)

This page describes a reusable SQL database table of ISO 3166 country codes and names that the author created to avoid repeatedly building the same reference data from scratch for international user registration forms. The author provides the downloadable SQL file, explains how to import it into MySQL, and demonstrates with PHP code how to use it to generate drop-down select lists while maintaining data integrity through foreign keys. The page also documents updates over several years, including additions of 3-letter codes, properly capitalized country names for display, and a similar table for U.S. states and postal abbreviations.

Permalink

10 Rock Solid Website Layout Examples | Design Shack

This article presents ten versatile, tried-and-tested webpage layout templates—ranging from simple three-box designs to complex power grids—that designers can adapt when facing creative block. The author emphasizes that while each layout appears in countless websites, their styling (colors, fonts, graphics) can be made unique, and the layouts themselves should be modified rather than used as-is to suit individual project needs. The piece includes silhouettes, real-world examples, and template recommendations for each layout to demonstrate practical applications across portfolios, e-commerce sites, blogs, and corporate pages.

Permalink

Curing the Navigation-itis Syndrome | SpyreStudios

The article argues that excessive website navigation menus—"navigation-itis"—overwhelm users and reduce engagement, then provides nine practical design principles to simplify the experience, including consolidating multiple menus into one, limiting dropdown depth to two levels, and keeping items text-based rather than icon-only. It illustrates these principles through a critique of National Geographic's website, which uses three separate navigation bars, and shows how dropdown menus and search consolidation could reduce cognitive load while preserving access to all content.

Permalink

Using Flexviews – part one, introduction to materialized views - MySQL Performance Blog

Flexviews is a tool that enables incrementally refreshable materialized views in MySQL—pre-computed, stored query results that update only the changed rows rather than recalculating from scratch. Unlike regular views (which recompute on every access) or complete materialized view refreshes (which rebuild entirely), incremental refresh examines only rows that changed since the last refresh, making it orders of magnitude faster for large datasets while maintaining transactional consistency across multiple views. The tool works through three mechanisms: capturing what changed in the database, computing the differences those changes produce, and applying those differences to update the stored results.

Permalink

Speeding Up Your Website’s Database - Smashing Magazine

While website speed improvements typically focus on file sizes and server settings, database query optimization is equally critical—a homepage might load in 1.5 seconds while slow database queries bog down search or product pages. The article provides practical techniques for identifying and fixing database bottlenecks, starting with simple methods like adding indexes to frequently queried columns (which can speed up queries 100+ times) and progressing to more complex solutions like restructuring queries with JOINs, caching results, and optimizing table storage. These approaches help developers diagnose whether sluggish page performance stems from poor database design or slow queries rather than network or server issues.

Permalink

What’s The Best Date Format? » SitePoint

ISO 8601 format in UTC (2011-03-21T00:18:56Z) is the optimal standard for storing and comparing dates programmatically because it's sortable, unambiguous, compatible with JavaScript's Date constructor, and works across systems without timezone complications. Rather than storing multiple timezone versions, all timestamps should be recorded in UTC on the server and converted to local time only when displaying to users, maintaining a single reference point for comparisons while preserving information needed for internationalization. The article provides practical implementation examples in PHP using `gmdate('Y-m-dTH:i:sZ')` and JavaScript methods for generating and formatting timestamps consistently across client-server applications.

Permalink

How to embed HTML5 into a native Mac OSX app - Lost Decade Games Blog

This tutorial explains how to embed an HTML5 web application into a Mac OS X desktop app using Xcode and WebKit, allowing developers to reuse the same HTML5 codebase across multiple platforms. The author walks through creating a new Cocoa application project, adding the WebKit framework, importing HTML files as resources, and configuring the application delegate to load and display the HTML content in a WebView. The approach enabled the creators of Onslaught! Arena to launch their Chrome Web Store game on the Mac App Store without modifying the source code.

Permalink

Scoped Styles in HTML5

The `scoped` attribute on HTML5's `<style>` element limits CSS rules to only the parent element's subtree, enabling styled content to be syndicated across different pages or embedded as widgets without affecting the receiving document's styles. Although no browser supported it at the time of writing (with Chrome Canary beginning experimental support), the feature faced a significant adoption barrier because non-supporting browsers would apply scoped styles globally rather than ignoring them gracefully, making widespread use impractical until cross-browser support materialized. A jQuery polyfill existed as a workaround for most browsers, though the author questioned why the spec didn't create a new element type instead of an attribute for better backwards compatibility.

Permalink

HOWTO: Native iPhone/iPad apps in JavaScript

This guide demonstrates how to build full-featured iOS apps using JavaScript, HTML, and CSS—complete with native-feeling interactions like gestures and touch events, offline caching, home screen icons, and splash screens. The author explains specific techniques for removing browser chrome, preventing unwanted scrolling and zooming behaviors, and styling elements to match iOS design conventions, then walks through bundling the web app as a native Objective-C app for App Store distribution. The post includes practical examples like a gesture-controlled graph navigator and a medical logging application that syncs with a backend database.

Permalink