Reducing image sizes somehow else (Smush.it is dead)

With images for this blog, I reduce their sizes with Yahoo’s Smush.it utility.  The benefit of this is that it leads to small image sizes, which means less for your web browser to download.

This image, with Smush.It, reduces from 436KB to to 386KB:
Bendigo Tram No. 21
Unfortunately, Smush.It has been not so reliable of late, so I was thinking of writing my own replacement.  It’s not difficult to replicate what Smush.It has done, essentially:

  • if the image is a GIF, convert to PNG
  • optimize PNG images with pngcrush.
  • optimize JPEG images with jpegtran.

So it would be fairly simple to code something up, which calls pngcrush and jpegtran.

Or I could Google to see what’s out there, and see what other people have done.  After an hour of stuffing about, I finally settled on Radical Image Optimization Tool (RIOT)
Radical Image Optimization ToolThe Bendigo Tram image reduces down from 436KB to 126KB.  The image quality looks the same to me, and it’s good enough for a web blog.   So I’ll be using it in future for pre-processing images for this blog.  Plus it has “batch” processing, which I’d find useful as well.

If I was using a Macintosh, I’d look at using ImagOptim

References:

AV virus exclusion post update, and other post updates.

Updated the

Another day, another theme change

Post content font size You might have noticed that I briefly switched to the Atahualpa theme.  I did this because the upgrade to the Swift theme broke how fonts looks (they got a lot smaller, and hard to read).

My second mistake was that I didn’t setup enough time aside to troubleshoot, should something go wrong.  I made an assumption that it work just work.

But it broke anyway.

The underlying cause?  A new option in Swift, which allows you to change the primary post size.  I had it set to 0.6.

Doh!  (And yes, the layout still needs work)

Bookmark and Share

Making your blog load faster.

Use the WP Super Cache plugin.  In the case of Wisefaq.com, pages load three times quicker with it.  JErm asked in the comments for the “Make it go faster – Enabling GZip Compression

How does this relate to WP-Super-Cache usage? Can they work hand-in-hand to make your site load even faster?

Yes they can.  I did some measurements of WP Super Cache turned off & on.
WP Super Cache
  (figures in milliseconds, lower is better)

WP Super Cache makes a big difference.  If you can make your page(s) load quicker, your visitors, and Google will thank you for it.

Why Google you ask?  Well, Google are now taking Page Speed into consideration for search ranking. So anything you can do to improve your page load speed is going to help.

But don’t just take my word for it, have a read of the Performance Benchmarks section of the WP Super Cache page.

Bookmark and Share

How to redirect Blogger Beta to WordPress.com (Laffers.net)

Blogger to WordPress image - courtesy of Digital Inspiration

This was originally a post at Laffers.net, but I’m getting constant timeouts to that site, so I’m going to repost it here, just in case Laffers.net has gone down.
This copy was captured by the Google Cache as it appeared on 24 Dec 2009 04:44:07.

I refer to this article in the following two posts of mine:
So you want to move from Blogger to a WordPress blog & Things I learnt when migrating from Blogger


 

If you are like me and have decided to move your blog from blogspot.com to wordpress.com (the shared WordPress hosting site), you are asking yourself three questions:

  1. How to redirect visitors to the old blog automatically to the new pages.
  2. How to transfer the PageRank of your old blog to the new one.
  3. How to prevent being penalized by Google for duplicate content.

Is it possible ? Read on.

First of all, let me give credit where credit is due – there are some instructions already published

  • Tom Sherman has a nice manual for moving from the old Blogger to self-hosted WordPress.
  • [TechCounter] similar to the one above but contains erroneous information about preserving PageRank.
    (TechCounter link broke 2013 – http://www.techcounter.com/wordpress/301-permanent-redirect-from-blogger-beta-to-wordpress/?cp=2#comments)
  • Webbleyou is a tutorial for migrating from Blogger Beta, but I find it unnecessarily complicated.

Bottomline: None of those tutorials work for moving to the shared hosting on WordPress.com!

how to do it

Here are the answers to the three questions:

  1. Redirect your visitors by combining JavaScript and meta tag redirects. Read below.
  2. Bad news, this is not possible. Tom Sherman correctly states

    This would require a 301 Permanent Redirect and access to the server, not provided by Blogger.

  3. If you don’t want to be punished by Google for duplicating content you must remove the old blog from the Google cache and tell it to ignore the old site from now on. Read below below.

set up redirects

I’m assuming that at this point you have imported your posts to the new blog at WordPress.com (if not, go to “Manage/Import”, select the obvious choice and do what you’re said).

Log into your Blogger account and click your way through the awkward navigation menu until you are at the “Template/Edit HTML” page. To redirect visitors from the main page, insert the following between the <head> and </head> tags:

<meta content='6;url=http://yournewblog.wordpress.com/' http-equiv='refresh'/>

Number 6 means that the redirection will take effect after 6 seconds. Replace the url with your own.

The tricky part comes now. We want to redirect users from individual post pages to the corresponding post pages on the new blog. For that, we need a piece of JavaScript spiced with Blogger proprietary tags. Insert the following right after “<b:section class='main' id='main' showaddelement='no'>” in the template:

<b:widget id='Redirector' locked='true' title='Blog Posts' type='Blog'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
<b:loop values='data:posts' var='post'>
<script type='text/javascript'>
var new_page=&#39;yournewblog.wordpress.com/&#39;;
var permalink = &#39;<data:post.url/>&#39;;
var timestamp = &#39;<data:post.timestamp/>&#39;;
timestamp = timestamp.split(&#39;/&#39;);
timestamp = timestamp[2]+&#39;/&#39;+timestamp[0]+&#39;/&#39;+timestamp[1];
new_page = permalink.replace(/youroldblog\.blogspot\.com\/2007\/[0-9]{2}/,new_page+timestamp);
new_page = new_page.replace(/\.html$/,&#39;&#39;);
document.location.href = new_page;
</script>
</b:loop>
</b:if>
</b:includable>
</b:widget>

Don’t forget to enter your new blog’s URL at var new_page = .

Important note! For this script to work, all your posts should have been imported to WordPress.com using their Manage/Import function. The creation dates of all posts must match, because they are part of the permalinks.

remove duplicate content

Insert the following between the <head> and </head> tags:

<meta name="ROBOTS" content="NOINDEX, NOFOLLOW"/>

After seeing this, search engines should remove your old blog from their cache and the old content will stop existing for them. Therefore they are not going to penalize your new blog for duplicate content.

optionally, display a message

This is not required, but helpful for your readers. Tell them that you have moved and that they are going to be redirected. Right after the <body> tag, insert this:

<div style='position: absolute; top: 30px; left: 30px; border: solid 2px #333; color: #000; background-color: yellow; padding: 5px; width: 400px; z-index: 5; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: large;'>
<p><strong>My blog has moved!</strong></p>
<p>You should be automatically redirected in 6 seconds. If not, visit<br/> <a href='http://yournewblog.wordpress.com/'> <strong>http://yournewblog.wordpress.com</strong></a> <br/> and update your bookmarks.</p>
</div>

Well, now we are set. Found any errors in this tutorial or have more tips? Share them in the comments please. 🙂

Except where otherwise noted, this work is licensed under a Creative Commons License.
© 2005-2008 richard laffers

Bookmark and Share

Hotlinking Thieving Bastard

core77_milan_coffee1[3]_2

I was chuffed that someone linked to my “What coffee drink is that” post.  I first saw the chart at another blog, so I grabbed a copy of it.  My post wasn’t that great, but I liked the chart.  So did someone else.  They linked directly to the image on my server.

The thieving bastard.

2 reasons to direct link (hot link) to a image:

  1. save bandwidth on your server, as the web browser will load the image from someone elses server, and/or
  2. you’re a lazy bastard.

So what this meant was that every visitor to their website, was downloading the image from my website., and they didn’t know it.

It wasn’t that this thieving bastard couldn’t store the image on his blogger site.  He was just lazy.

I’ve decided to show this image to hotlink-ers:
hotlink-image

The technical jiggery-pokery is done by modifying .htaccess to block hotlinking.

Instructions to do that can be found here:
How to Embarrass RSS Scrapers Who Hotlink to Your Images

To search Google Images for thieving bastards, you use the following syntax:
inurl:<your site> -site:<your site>

Link Checker – another WordPress plugin

Link Checker is designed to crawl though your blog, verifying that the links you’ve linked to are still there.

broken link checker options

Now my utility of choice is Xenu, and I blogged about it here.  Not that there is anything wrong with Xenu, I just noticed Link Checker* and thought I’d give it a spin.

So, the results?

broken link checker report

Took about 10 minutes to scan 2385 links, which seems ok.

Now you can leave the plugin Activated, and every 72 hours (default), when you login to the Admin panel, it will run.  I’m going to de-activate it, and only run it every couple of weeks.

* first heard it while looking at Pelf Nyok’s “Pelf-ism is contagious” blog.

Make it go faster – Expires Headers

apache_feather Or, Wisefaq now tells your web browser that it’s ok to cache graphics (GIF/PNG/JPG/JPEG/ICO), Javascript and CSS.

“This would be important because??”, you ask.

Well when you visit again, your web browser will use it’s copies of the graphics/Javascript/CSS, instead of downloading them again.

A win for you (speed), and me (bandwidth).

Hooray for us!

So how did I manage this?

Wisefaq sits on an Apache web server. Continue reading