I do results.

And by that I mean I make stuff, for the web mostly, using WordPress mainly.

If you want to know more check me out on Twitter or swing over to my design business.

I’ve just spend the best part of a day messing around with a thoroughly annoying issue on a WP Powered site.

The brief was simple – add a pop-up which prompts the user to complete a survey, if the user declines or accepts store this action in a cookie so the pop-up never appears again.

Easy right? Well yes. I’ve done this a few times before, no problem.

This time however there was a problem. The cookie just wouldn’t ‘stick’. By that I mean it was as if the pages on the site were just ignoring it. The pop-up was looping round, poping up all over the place no matter what the user had selected.

I re-wrote the code 3 times over 2 days – still the same issue. I tried everything from disabling all my plugins trying the site on multiple connections and different computers/browsers. All the same.

I knew the issue was something to do with the site cache. But nothing I did worked. Even with no plugins and no permalinks the site gave me no clue as to where I was going wrong.

And then I opend my .htaccess file.

Turns out a couple of weeks before I had left some code in the file from when I had been messing around configureing WP Cache

Something like this:

—————–.htaccess—————–
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]

RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{QUERY_STRING} !.*attachment_id=.*
RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
—————–.htaccess—————–

# BEGIN supercache

AddEncoding gzip .gz
AddType text/html .gz


SetEnvIfNoCase Request_URI \.gz$ no-gzip


Header set Cache-Control ‘max-age=300, must-revalidate’


ExpiresActive On
ExpiresByType text/html A300

# END supercache

The above code was the problem. When I worked this out and removed it, the site worked file. Rather than being happy, I was pissed off. I mean, hours and hours of work. At one point I smacked down on my keyboard so hard some of the keys came off!

So, if you’ve ever messed around with WP Cache and your .htaccess file, please remember to remove all the settings when you are done. It will save you a lot of pain.

one

My new mouse/keyboard combo has just arrived. Here are some obligatory un-boxing shots:

none

I’ve had my office Microsoft Intellimouse for 7 years now. I’ve also had the SAME one at home for over 11 years.

Both mice are showing their age with my office one only recognising 1 in every 3 clicks and my home one freezing every now and again. Because of this its time to move on and get a new mouse, hell, I may as well get a new keyboard too.

Enter Logitech

10 years ago Microsoft were at the forefront of mouse design. Recently Logitech have taken this mantle after a string of excellent gaming mice.

Its also evident that wireless is the new in-thing. Try as I might I couldn’t find a high-tech wired mouse for the office!

After a couple of weeks doing R&D into the new world of mice I settled for the ‘Logitech Cordless Desktop MX 5500 Revolution’:

The MX 5500 bundle includes the MX Revolution Mouse which by my reckoning is the best non-gamer mouse on the market right now.

It also comes with what appears to be a super snazzy keyboard, something I have needed at home since I accidentally ordered a Dell USA layout keyboard from eBay 2 years ago.

At £50 for the mouse and £100 for the bundle they arn’t cheap but I paid £50 for each of my Intellimice and got almost 10 years out of each of them.

none

I’ve followed the work of Douglas Bowman for a number of years. In fact, his article on moving away from table-based web design and over to pure CSS was the start of my journey into what I now consider to be ‘true’ web design.

Doug was lucky enough to get a job with Google back in 2006 (after heading the Blogger re-design) and since then his site has been pretty much dormant.

Yesterday however, I noticed a post over at reddit that led me to the all new stopdesign website which was updated in the new year – it seemed that Douglas Bowman was back :)
 
Its also apparent that he has switched from Movable Type to WordPresstake that Six Apart..

Welcome back Doug, I missed you.

none

Michael Kimb Jones

Hello, I'm Kimb. I don't use the 'Michael' part of my name so neither should you.

I create web-based solutions for businesses and individuals and I've been doing it for over 10 years now. You can check out some of my work over at my design business base6.

These days I mainly work with WordPress because its free, great to work with and best of all open-source.

So, if you need some help with a project or just want to get in touch, feel free to drop me a line.

My Tweets

My Blog