Web Dev Blog

Looking for help with WordPress, Apache, Vim, Web Security and more. Here are a few tips.

Is the iPad the new IE6

iPad is the new IE6

Imagine you are working on a project targeted for the iPad, Chrome and Safari that should contain an interactive HTML5 video… Design and feature-wise the project seems pretty simple and since you assume that the newest Webkit browsers have a good support for CSS3/HTML5/JavaScript (and Steve Jobs says it’s “amazing”) you shouldn’t have any issues building it, especially since you have coded many video players and interactive videos using Flash before and you are pretty experienced with HTML/JS projects and have used HTML5 video and CSS transitions/animations on a couple other projects.. A couple weeks of development should be fine… – Now you have a big problem.

This is something I’ve dealt with lately, sites not showing up correctly in the iPad. The iPad is a the first wave of simple specialized computers (OK, maybe the second after the iPhone and other smartphones), but it is one of the worst when it comes to displaying html pages consistently with IE, Firefox, Chrome and even the full version of Safari. Safari Mobile has quirks, especially with it’s complete lack of Flash support and difficulties with html5. iPad users complain when sites send them to their mobile pages, but that is the only way to guarantee a consistent experience on the Safari Mobile platform.

Many of us were hoping the days of coding for bad platforms like IE6 was over, but now the iPad rears it’s ugly head. This is an issue Apple should address as soon as possible.

Facebook is invading our lives

Ever feel like Facebook is everywhere? Yahoo News has a great news feed with lots of articles and I regularly read news there. Today I was reading an article, wanted to comment on it, and found that I couldn’t comment without using a Facebook login.

The Ring of PowerNow, I try to keep some of my opinions off of Facebook. I have lots of friends from diverse backgrounds there and I don’t really want to offend any of them with my latest opinion about Rush Limbaugh, Solar Flares or Chocolate Milk. Because of this, I don’t typically login with my FB ID to other sites when I comment. I have a Yahoo account and I like to use that for commenting on Yahoo.

Well today things changed. Today, instead of being able to login and comment as a Yahoo user I was forced to access facebook. Yahoo even wanted to connect my existing Yahoo account to FB.

Facebook and Yahoo and all these other sites need to stop this. I want to compartmentalize my life to a certain extent and keep my public, private and professional lives a little bit separate. Having my profile picture with my niece and I show up on Yahoo is disturbing and as a result I will likely not post to Yahoo any more and reserve browsing Yahoo to when I am not logged in to Facebook. This needs to stop. Sure, Facebook is all about the money, especially with an IP coming up, and I understand that Yahoo and these other sites are desperately trying to hook into Facebook and ride it to the top, but this is not acceptable. Facebook is not the One Ring to Rule Them All, and if it is it needs to be thrown into the fires of a Volcano NOW!

Remove spaces from filenames on the Ubuntu Linux command line

I’ve been working on sizing a large number of images for a client to go into a WordPress photo gallery. I use a for loop to find all the files and use convert to size them to a good size for viewing on a website. The problem is the convert program doesn’t like file names with spaces in them. It seems like the easiest thing to do is remove the spaces from the file names with a Ubuntu command line script. This is easily accomplished with the rename comannd.

rename 'y/ /_/' *

This script will replace any spaces spaces in the filenames with underscores (_)

Using CSS 3 @font-face for font rendering

There are multiple methods of creating custom fonts for web pages, Cúfon, sIFR, Google Web Fonts, etc… None of these have been a good fit for my projects until I looked into the CSS3 @font-face method. It’s simple to use and SEO friendly.

All you have to do is go to urbanfont.com, fontsquirrel.com or another good source of appropriate licensed fonts and pick out what you want.

Once you have the font files, use the @font-face generator at fontsquirrel.com to create a kit that includes all of the font files you need for browser support. Put the fonts and sample code in the appropriate places and update your CSS to use the new fonts. Walla, shiny new fonts on your web page.

“Let it Snow” on Google – Latest Search Engine Easter Egg

‘Tis The Season for Peace on Earth, Sugarplums and dreams of a White Christmas. Google is doing it’s part with a new search engine Easter Egg.

Search Engine Easter Eggs

Google has been famous not only for being a great search engine, having awesome logo doodles, but also for it’s search engine easter eggs. Searching for things like “Do A Barrel Roll” and “askew” bring up some fun results and now Google is joining in to the Christmas season with “Let it Snow”!  If you let it snow long enough it will even fog up your screen and offer a “Defrost” button to clear off the ice.

For those of you who like stuff like this, here is a list of 10  silly Google tricks, and for those of you who are just in the mood from some Christmas music…

 

 

 

Beware the Facebook Other tab

Facebook has become part of many of our daily lives, and in spite of the constant random updates and annoying changes, we are still sometimes lulled into trusting it. Such was the case for the honest man who found one of the Slate writers MacBook Air in a New York Taxi Cab. The finder’s well meaning messages didn’t get to the recipient because of the Other tab, and this journalist nearly lost her high priced laptop forever.

Back in 2009 Facebook decided to route all messages that didn’t originate with your friends or friends of your friends into a separate mailbox named Other. This basically turns it into a spam folder, and when I looked in mine that’s pretty much what was in there, but you should probably check yours. You never know, there might be a job offer or a note from a secret admirer hiding in there.

Using Google Multiple Accounts to make Analytics easier

I’ve had a dilemma for a while. I have two google accounts. One has my google reader setup and some of my analytics. The other, setup with my business email address gave me access to clients Analytics accounts.

I’ve struggled with this for a while, logging in and out of both of my google accounts continually, until yesterday. Google, for the last year, has had a multiple account sign-in feature. Multiple accounts can be added and switched between easily.

Initially I didn’t think this was going to help, it doesn’t support Analytics, but it does support Reader and Gmail. So now, I login with my business Analytics account, but can quickly switch to my personal account when I’m in Reader and Gmail. No more logging in and out to see customer’s analytics.

Using Akismet with Contact Form 7 (CF7)

This is an issue I’ve run into multiple times, and I have to search for it every time, so thought I would share it here. You can use the AWESOME Akismet to filter spam on contact forms in WordPress that use Contact Form 7.

Next, add the following Akismet-related options into the appropriate fields in your form.

akismet:author
Add this option to the field that accepts the name of the sender.
Example: [text* your-name akismet:author]
akismet:author_email
Add this option to the field that accepts the email address of the sender.
Example: [email* your-email akismet:author_email]
akismet:author_url
Add this option to the field that accepts the URL of the sender.
Example: [text your-url akismet:author_url]

And the most important tip:

If Akismet judges the submission as spam, Contact Form 7 cancels the sending of mails and shows a message that says, “it failed to send the message.” You’ll see an orange border around the response message when it has been judged as spam.

Visit the Contact Form 7 blog for more info.

Disable Chrome QuickSearch for Google

I’ve been using Chrome a lot. Why you ask? Mostly because it works really well on my Ubuntu workstation. Getting Flash and Firefox to play nice together under Linux has been a challenge for years, but Chrome doesn’t seem (at least so far) to have problems like that.

There is one big annoyance I have with Chrome though, QuickSearch. When you type a search term that starts with Google into the URL bar Chrome automatically goes into this QuickSearch mode.

For example, I was going to search for the Google News Archive today (another project Google is shutting down that I hadn’t ever heard of). I typed “Google News Archive”. Chrome conveniently, because the term started with ‘Google’, put me into a search mode labeled ‘Google QuickSearch’. The result of my query? Just a search for ‘News Archive’.

The funny thing is, Chrome searches with Google by default. You can use other terms for QuickSearch, like wp (wikipedia), e (ebay), z (amazon), g (google again??? What’s the difference between this and Google QuickSearch??) etc..

It’s not too difficult to change this irritating behavior. Just go to Preferences->Basic, under Search click Manage Search Engines. The first entry in the Other Search Engines section is Google QuickSearch, just delete it and you will be able to once again search for terms that start with Google