futtta's blog

Frank Goossens' Twitterless twaddle

Archive for the ‘blog’ category

Speed up your (WordPress-)site!

with 3 comments

Google likes fast! Visitors like fast! So why don’t you go make your site really fast?

Suppose you just bought yourself hosting and you just installed WordPress for blogging or lightweight-CMS-purposes, how can you improve your site’s performance in that case? Easy!

  1. speed up PHP: use a caching optimizer (I use APC) to significantly speed up PHP performance (don’t bother  signing up for shared hosting with a company that doesn’t offer PHP with acceleration).
  2. cache dynamic output: install the “WP Super Cache” WordPress plugin. Configure and then forget about it; if you create/edit a blogpost, impacted pages are automatically removed from cache.
  3. optimize CSS and JS: install the “CSS JS booster” WordPress plugin, which (amongst other things) grabs all CSS and JS from WordPress and Plugins and outputs it in one CSS- and one JS-file (some plugins, e.g. Sociable and WordPress Mobile Pack, might need tweaking of the css media-attribute though)
  4. avoid calling 3rd party javascript: tracking (e.g. Google Analytics, which I removed), widgets (e.g. Twitter badges) or other 3rd party gadgets (e.g. AddToAny, which I removed) can slow down your site’s performance significantly
  5. optimize images: fire up your favorite photo editor and make that image just a bit smaller, use an acceptable level of compression (I end up between 70 and 80% for JPEG’s, depending on the image) and upload to smushit.com to squeeze out the last optimization-drop (example; I used a 20KB picture from Flickr, resized it to 80%, saved it with 77% compression and smushed it to end up with a mere 6KB).

The impact of a number of these steps can be measured easily; below are the response times of my blog’s homepage (the  html including css, js and images) as measured by Pingdom Tool’s Full Page Test.

  1. default Wordpress (on a Linux VPS with 320Mb RAM memory): 6.5 seconds
  2. (1)  with PHP APC activated: 4.1 seconds
  3. (2) with WP Super Cache: 3.1 seconds
  4. (3) with CSS JS Booster: 1.3 seconds

So there you have it, from 6.5 to 1.3 seconds in only 5 easy steps! WordPress specific, but easily applicable to other platforms as well. Now go and make your site fast! And then go and make it even faster!

Written by frank

March 11th, 2010 at 9:58 pm

AddToAny: removing the “spy” from the share-ware

with one comment

After discovering AddToAny secretly enrolls all of my blogs visitors in a behavioral marketing platform, I disabled the plugin and mailed the author for more information. He answered the media6degrees-integration was a partner-test, only providing them with non-personally identifiable data, which the company indeed can use for targeted advertising. But the good news was that AddToAny would also offer a “publisher opt-out mechanism” shortly. And indeed, last week, Pat announced the brand new a2a api and mailed me the following opt-out code;

var a2a_config = a2a_config || {};
a2a_config.no_3p = 1;

These two lines of javascript, which have to be placed in front of the http://static.addtoany.com/menu/page.js script-include, should disable all current and future 3rd party tracking. I hope the web-guys from e.g. deredactie.be and standaard.be (and there are many others) implement this as soon as possible!

So now we can opt-out from having our visitors being spied upon by media6degrees, what more could one want? Well, since you’re asking, here’s a small list of things AddToAny could really should do;

The opt-out code is a important first step and I’m sure concerns such as those voiced on the WordPress-forums will help AddToAny to further make the right decisions!

Written by frank

February 15th, 2010 at 10:28 am

Posted in Internet, blog, deredactie, lang:en

Tagged with , , , , ,

(Not) Obsessing over the iPhone

without comments

PPK of Quirksmode-fame it at it again, this time badmouthing iPhone-centric web development. A lot of people seem to take issue with his point of view, but aside from the (typically Dutch?) in-your-face bluntness, I do think he makes some very valid points. The web is about broad accessibility, about allowing as many people as possible to access your information/ application and the same should indeed be the case for mobile web development.

Sexy as a iPhone-UI mimicking webapp (based on e.g. iUI or JQTouch) might seem, it does have a number of important shortcomings:

So yes, web-developers should try to build mobile sites that render on as many devices/ browsers possible, as we do on the non-mobile web. Unless you’re willing to invest in several sites for different handsets, building for one specific device is a bad choice, however good the browser might be (and Safari Mobile indeed is great).

That’s why I decided to switch from the iPhone-centric WPTouch (which I installed only 3 months ago) to “WordPress Mobile Pack” for this blog. WMP offers great mobile functionality out of the box;

It includes a mobile switcher to select themes based on the type of user that is visiting the site, a selection of mobile themes, extra widgets, device adaptation and a mobile administration panel to allow users to edit the site or write new posts when out and about.

When running the MobiReady test to assess how “mobile-ready” my blog is, I get a great score of 4.35/5 (page size being the main remaining issue). So thanks for ranting PPK!

Written by frank

February 11th, 2010 at 12:58 pm

Posted in Web development, blog, lang:en, mobile web

Tagged with , , , , , , ,

Enhanced privacy for embedded YouTube

without comments

While looking into the possibility to play embedded YouTube clips with html5’s video-element on this blog, I noticed Google added an ‘Enable privacy-enhanced mode‘ flag to the embed-options. This small tweak ensures that visitors who arrive on a page that has YouTube embedded, don’t immediately get tracking cookies stuffed down their throat. Unless they play the video or click through to youtube.com, that is.

Enabling the “enhanced privacy” option just changes the URL in the embed code from youtube.com to youtube-nocookie.com;

<object width="560" height="340"><param name="movie" value="http://www.youtube-nocookie.com/v/FuGJfVAgiTM&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/FuGJfVAgiTM&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>

The change has no impact whatsoever on the user experience, so I immediately tweaked the code of the Smart YouTube Wordpress plugin on my server and I asked the developer to add the option to his plugin as well.

Yet another small step in the fight against Google’s omniscience!

Written by frank

January 25th, 2010 at 5:01 pm

Posted in Internet, blog, lang:en

Tagged with , , ,

AddToAny removed-from-here

with 5 comments

When looking at my blog’s performance in Google Webmaster Tools I saw Google complained of multiple dns-lookups. I knew about stats.wordpress.com, google-analytics.com (well, yeah …) and gravatar.com, but one domain in the list didn’t make sense to me at all; media6degrees.com, so I started to investigate a bit. Grepping the wordpress-, theme- and plugin-code on my server didn’t reveal anything, so I went into Firebug to see what was happening in javascript.

Apparently the AddToAny Wordpress-plugin was initiating the call:

  1. add-to-any requests http://static.addtoany.com/menu/page.js (which is rather big but gzipped & cache-able)
  2. page.js in turn contains tracking (near the end of the file), by requesting an 1X1 pixel image at http://map.media6degrees.com/orbserv/hbpix?pixId=2869&curl=<encoded URL of page>
  3. media6degrees then sends the pixel and … sets multiple cookies in the process

And what’s media6degrees business you ask? Maybe they’re just providing the add-to-any author with statistics? Well, not exactly. This is what media6degrees writes on their website: “We deliver scalable custom audiences to major marketers by utilizing the online connections of their consumers.” So by using AddToAny, you’re providing media6degrees with data about your site’s visitors, which they can use to sell targeted communication to their customers.

If visitors of small-time blogs like mine would be the only ones affected by this, the damage would be limited. But AddToAny is also implemented on large local news-outlets such as deredactie.be or De Standaard Online and no doubt on some big international sites as well. Somehow I doubt those organizations know they’re feeding their visitors to media6degrees and I bet some of them would even strongly disagree.

I’m not happy about this, that much is clear. AddToAny offers great functionality, but:

I mailed the author about this earlier this week (when i didn’t even know about media6degrees tracking cookies yet), but got no feedback up until now and I logged an issue on the wordpress.org support forum as well. And I decided to pull the plug on AddToAny off course, replacing it with sociable, making my blog render yet another millisecond faster, while at the same time protecting my visitors from this sneaky behavioral tracking by AddToAny and media6degrees.

Written by frank

January 22nd, 2010 at 5:01 pm

Posted in Internet, blog, deredactie, lang:en, security

Tagged with , , , , , ,

blog.futtta.be going mobile with WPtouch

with one comment

blog.futtta.be goes mobileAfter reading how wordpress.com implemented not one but two mobile versions for all of their 4.5 million hosted blogs, I decided to install the same WPtouch-plugin on this very blog as well.

Installation and activation of a new plugin is very straightforward from within the wordpress admin-screens. In the case of WPtouch (and every other plugin that produces alternatives views of the same content on the same URL) however, there is a conflict with the WP super cache plugin which needs to be resolved by basically telling the cache-plugin to not handle request from browsers with “mobile” useragent-strings.

After that WP super cache config hack, your blog has a mobile section which you can tailor to your needs in the WPtouch config screen. These are some of the settings I changed:

If anyone visits this site with their mobile browser and stuff doesn’t work, your feedback is welcome!

Written by frank

October 22nd, 2009 at 12:12 am

Posted in blog, lang:en, mobile web

Tagged with , , ,

Blog Action Day 2009: klimaat-twijfel?

with 9 comments

Het was een paar dagen geleden toch weer warm voor de tijd van het jaar, niet? Dat ziet er potverdorie niet goed uit voor onze ijskappen, nog even en het water staat ons helemaal tot aan de lippen. Armageddon, dan toch nog, ik had de Getuigen nooit de rug mogen toekeren! Maar als we nu allemaal héél erg ons best doen, als Amerika en China zich eindelijk achter Kyoto (of Kopenhagen) scharen, misschien, héél misschien komt het dan allemaal nog goed?

Nee, ge ziet het, ik ben niet één van die mensen die vrolijk panikeren over hoe ons klimaat bijna finaal naar de kloten is en over hoe we dat allemaal aan onszelf te danken hebben, of dan toch zeker aan de industrie, aan Amerika en aan Bush Jr. persoonlijk.

Maar
kernenergie is verrijkend voor electrabel en de franse staatskasMaar dat betekent niet dat er volgens mij geen vuiltje aan de lucht is. Er loopt wel degelijk iets verkeerd met milieu en klimaat en dat is denk ik ten minste gedeeltelijk te verklaren door onze collectieve hyper-activiteit. En als ik -we blijven simplistisch- moet kiezen tussen meer of minder CO2, dioxines of andere residuen van onze menselijke doe-drang, dan moogt ge voor mij dus gerust een streepke bij “minder” zetten, ook al geloof ik niet dat we daarmee de veronderstelde toorn van (schrappen wat niet past) God, Moeder Natuur of het Lot kunnen afwenden. Nu ik het toch over klimaat verandering heb tenslotte nog dit: omdat het zo moeilijk kiezen is tussen de pest (co2) en de cholera (kernenergie), vind ik het bijzonder spijtig dat de -misschien ambitieuze- beslissing om de oudste en kleinste kerncentrales vanaf 2015 te sluiten, nu door de huidige regering -toenmalig coalitiepartner OpenVld incluis-  terug uitgespuwd wordt.

Zo, daar hebt ge het. Een handvol niet onderbouwde meninkjes over mens, milieu en klimaat, in amper 3 paragrafen. Daarover moest ik van mijn linkse kerk vandaag immers bloggen, want het is Blog Action Day, over één van onze stokpaardjes dan nog! Soit, plicht vervuld, tot volgend jaar dan maar weer?
easy going solarcharger TYN91
Of wacht!
“Blog Action day”, misschien moet ik dan ook echt iets doen voor het klimaat? Zoals bijvoorbeeld deze zonne-energie batterijlader (“met baanbrekende MSPT-technologie“) voor mijn HTC Hero kopen? Wauw, dat zijn zelfs niet twee maar drie vliegen in één klap; ik heb er een leuke gadget bij, ik doe iets voor het milieu en ik kan m’n lezers op deze feestdag voor blogs en klimaat uitnodigen om ook zo’n zonne-energie hebbeding te kopen. Als we met genoeg zijn, is die klimaattop in Kopenhagen misschien zelfs niet meer nodig? En anders houden we er toch nog een korting voor een gezamenlijke aankoop aan over. Doet ge mee? Ik lees het wel, in de commentaren.

Written by frank

October 15th, 2009 at 12:01 am

Posted in Nieuws, blog, rants & raves

Tagged with , , , ,