Author Archive | Ted Roche

Blog optimization update: WordPress, CDN, Speed, Caching, Accessibility

Keep Calm and Clear Cache

Keep Calm

I’ve continued to do some research on optimizing the blog responsiveness, and I’m pleased with the results. Anecdotal tests this morning, with no local caching, showed a 2 second load time with a 1.2 second DOMLoaded event. That’s pretty good. Here are a few notes on things I’ve been working on:

  • Google’s PageSpeed Tools offered some helpful insights.
  • Minifying some of the text assets – HTML, CSS, and JavaScript – is working well, though I’d like to be more easily able to toggle this for debuggng.
  • Using the Rackspace CloudFiles caching with WordPress lacks a good automated tool on the WordPress side to keep the cache synced with changes. I’ve been using the SuperCache plugin for local speedups, and it supports a variety of CDNs. The CDN-Sync-Tool plugin is no longer available on the WordPress.org site, and several forks on GitHub all seem to be out of date. It’s unclear, so far, where the problem is. The WP cron jobs are failing. Whether that’s an internal configuration problem, or unsupported calls to an old API, I haven’t worked out yet. Next time I try this, I’ll look at some deeper pilot testing for CDNs with better WordPress support.
  • Inspired by “Why Bother with Accessibilty” by Laura Kalbag, part of the excellent 24ways series, I did some initial accessibility testing. The WAVE Web Accessibility Evaluation Tool tests your site for accessibility, an essential feature these days. Accessibility makes your site more understandable and easier to navigate for all users. Disabilities aren’t someone else’s problems; they are a state we will all pass through at one stage or another.There are a few glitches in my templates that I will work to rectify. A larger problem s the observation that my style choices have lead to a rather low-contrast site.

Using SQLite to Bypass the 2 GB .DBF Filesize Limit

Front page to ebook

Click to visit Hentzenwerke

The Hentzenwerke site has been updated, crediting me with editing Whil’s latest ebook, “Using SQLite to Bypass the 2 GB .DBF Filesize Limit.” Whil posits an interesting problem: how to work around the FoxPro 2-gigabyte DBF file limit when the client’s import file balloons in size? In this case, the problem was not that the data had exceeded the limit, but that additional data was included within the import file; more haystack hiding the needles. His solution was to use SQLite as an intermediate step, load in the bloated data, and then cherry-pick the few columns that really needed to be imported for this application. Sample files, instructions on working with SQLite, and example code of importing the SQLite data into VFP are included.
I volunteered to go over his first edition of the ebook and provide a technical review and light edit. I added a few suggestions for alternative techniques, poked at his prose when it got a little awkward, and tested his code and found a few typos. He, in turn, was gracious enough to roll his eyes and ignore my comments. I appreciate him giving me credit as editor on the book.

CDN Glitches

Thanks for all the feedback on the first day running on a CDN. Several issues were noted and addressed.

The fonts have been restored. There were a couple of funny problems that occurred. Headlines are using Asap and body text is Almost Alike, two fonts available using the Google Web Fonts CDN.

The symbol font FontAwesome is, well, awesome. It’s included in the Canvas framework/theme that I’m using, The FontAwesome font is used as a source of small graphic symbols and icons for things like the Search magnifying glass () and the RSS icon(). Canvas embeds the font within their framework in the includes/fonts directories, but when the files are specified in the CSS files, they are referred to with a version number, as in src:url('includes/fonts/fontawesome-webfont.eot?v=3.2.1')

This doesn’t actually load a particular version of the file, but it means that caches will be invalidated and the file reloaded if the version number is changed. However, moving these files to a CDN threw some problems: the CDN is really an object store that returns a file if the name exactly matches the name under which the file is stored. So, the file “fontawesome-webfont.eot” doesn’t match one with “?v=3.2.1” appended to the name, and the CDN doesn’t return the file. [Update: I’ rethinking this. While I was getting “Aborted” error messages downloading the font, today it appears to be working, so this may be a misdiagnosis.]

The solution I chose was to locate the single line in canvas’ font-awesome.css.less file that specifies the source for the fonts, then override that file, using the custom.css file designed for just that purpose, and specify the font-awesome sources as the Bootstrap CDN source. See http://www.bootstrapcdn.com/#fontawesome_tab for their suggested invocation. Using the @font-face declaration of that file, added to the custom.css overrode the early declaration and loads the font, successfully, from the CDN.

Notes from Seacoast WordPress Developers Group, 4-Dec-2013

Seven people attended the December meeting of the Seacoast WordPress Developers group, held at the AlphaLoft coworking space in Portsmouth, NH. The main topic was “Best Business Practices,” which was a great topic but, as always, the conversations and netwokring and recommendations that went on around the main topic were also very helpful and informative. Among those tidbits:

  • The Ewww image optimizer can reduce the size of images and speed webpage loading with minimal quality change.
  • Matt Mullenweg delivers an annual “State of the Word” speech with lots of interesting insights.
  • Open question: What topics would YOU like to learn about? The group is about YOU. How can we get YOU to attend?
  • Which SEO are people familiar with? WordPress SEO by Yoast was the most popular mentioned
  • Question on speeding sites, and a recommendation for the P3 Plugin Performance Profiler

On to the main topic: “Best Business Practices” can easily degenerate into a “Client Horror Stories” session. Kudos to organizer Amanda Giles for keeping a tight rein on the discussions and getting us to focus on covering as much as possible. Andy provided a redacted proposal he had written up for a client and we reviewed and discussed it. There was a lot of good back and forth. Andy had some very insightful item in his proposal that made it clear what the client would see at each phase, what items were optional or deferred to a later project phase, and how client decisions could affect the outcome in terms of schedule and cost. This was a great launching point for a lot of discussion on terms, contracts (my stance: pay a lawyer for a few hours to draft a good contract!), how to handle open-ended items like design reviews and never-ending revisions, terms for stock photos and graphics, and so forth. The discussion was very worthwhile and everyone felt they had their questions answered and learned a few new things. What more can you ask for a meeting?

Our next two meetings are scheduled for TUESDAY (not the normal meeting night) January 7th and Wednesday, February 5th. Please consider joining the Meetup group to keep up on the details on upcoming meetings.

New post testing CDN support on WordPress

DSCN1940 So, the Content Distribution Network is in place and several tests indicate it is working well — page loads are much faster, the URLs of the CDN content are re-written properly — but the next question is whether new materials will be automatically added to the CDN. The picture at the left (and yes, this is an excuse to post a cute dog picture, too) should appear with a link to the high-resolution (1.8 Mb) image. On the blog itself, that link should be of the format http://blog.tedroche.com/wp-content/uploads/2003/12/NameOfPicture.jpg, while if the picture is picked up by the CDN synchronization software, it should upload to the CDN and the URL be rewritten to http://static.blog.tedroche.com/etcetera. Let’s try it out and see what happens…

Woah. Success first time. Pretty cool.

Some details on what I’ve got set up: I’m using the Rackspace Cloud Files service as the CDN. I had worked with Rackspace before on some hosting projects, and have a friend working there, so I thought I’d try them out first. It appears that their CDN services are in an early stage and don’t have all of the features of soe of the more mature products. In particular, it appears that the blog software is reponsible for pushing any new or updated content to the CDN. By contrast, the Amazon S3 offering has an ‘origin pull’ feature that will pull content from the original source when it is first requested, and subsequently cache it.

In order to get the contents of my local blog to sync with the CDN, I added the CDN-Sync-Tool plugin. A lot of web searching seemed to indicate I could find this in the WordPress Plugins directory online, but the tool has been pulled from the directory. Apparently, it is undergoing some redevelopment. The version I found was on GitHub under https://github.com/WDGDC/CDN-Sync-Tool and installation was not more complex that downloading the ZIP and unzipping it in the plugins folder. Bear in mind that you should be comfortable with using the command line and have the skills to review the files you are installing on your machine, as there has been no review by the WordPress folks, and the code is currently under development and you may need to deal with bugs, incompatibilities and support problems. So, this isn’t the path I’d recommend for less-technical WordPress developers, and likely isn’t the path I’d recommend for a client looking to put a CDN into production use.

Note that most cache programs and their CDN features are set up in such a way that logged-in users may see a slower site, but more up-to-date, site, and that in order to test caching you’ll need to log out of your WordPress session.

 

WordPress files now served via CDN

In CorporateSpeak, we’d post, “In our continuing efforts to improve our service delivery and exceed your expectations and delight you with our experience…” but I’d rather speak plainly.

I’ve implemented a CDN – a content delivery network – to speed up the blog performance. The blog, running WordPress, was already using WPSuperCache, (updated link) but all of the responses would still be coming from the same web server. Using a CDN offloads the delivery of static content – images, CSS files, JavaScript – from the web server, and onto a high-speed network that’s tuned for optimal delivery in the fastest possible time.

I uploaded a large batch of files to the CDN to seed the cache. I will also need to set up another plugin to synchronize changes to the blog and upload those to the CDN.

Let’s see how this work. Let me know if you see any funny business.

Lost scrolls

This blog has been so long-lived, it reminds me of the joke about the little country museum that had a hatchet on display labeled ‘George Washington’s Axe.” When queried, the owner admitted the handle had worn out and been replaced a few times, and the head replaced when it had broken, but the rest was original. (see Ship of Theseus for the original original. Supposedly.)
Today, I restored a set of essays that predate the WordPress blog. They predate the Manila/Radio Userland blog. They were around long before the short-lived Blogger experiment. In fact, they may even predate the original Twiki blog-on–wiki. These started as sketches of essays that never had a place to be published. I added them to the Manila blog as ‘stories’ rather than posts, and that’s why I missed them when I ported the Manila blog, 31-January-2007.
You can find those essays starting here: http://blog.tedroche.com/2003/01/12/

Hurray for the border-box!

Paul Irish blogs here: http://www.paulirish.com/2012/box-sizing-border-box-ftw/ that a CSS3 feature promises to end the foolish layout war between those who think box boundaries should be measured to the borders and those who think a box’s boundaries are the size of its content. This has been a headache for anyone trying to get a set of boxes to line up properly and to work across all browsers, especially Internet Explorer.

Vijay Sharma shares his insights here: http://crypt.codemancers.com/posts/2013-11-17-box-model-behaviour/

Credit to: html5weekly.com (now merged into Front End Focus

Happy 64th birthday, Joe Walsh!

Chicago Stadium

Chicago Stadium

October 22, 1979 — Chicago, IL My fellow boot camp sailors Mike Dunning and Mike Seidler and I traveled from the Great Lakes Naval Recruit Training Center to Chicago to listen to the Eagles. We wore our dress blues (“crackerjacks”), with little decoration, as we were pretty raw recruits. The concert was amazing; we had a balcony view nearly over the stage. I don’t recall a lot of details of the venue, but the Internet sure does!. Here’s the setlist [Update: see below], the locale, details of Chicago Stadium, now demolished, and more links.

Update: the setlist disappears from the Eagles fan site, but fortunately, the Internet Archive Wayback Machine remembers;

Chicago

10/22/79

  1. Hotel California
  2. Already Gone
  3. In the City
  4. Doolin-Dalton
  5. Doolin-Dalton/Desperado (Reprise)
  6. Lyin’ Eyes
  7. I Can’t Tell You Why
  8. Desperado
  9. Heartache Tonight
  10. One of These Nights
  11. Turn to Stone
  12. Life’s Been Good
  13. Life in the Fast Lane
  14. Rocky Mountain Way
  15. Greeks Don’t Want No Freaks

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.