Menus and listings for all Edinburgh restaurants, cafes and takeaways

Archive for the ‘technical’ Category

Faster, thanks to YSlow

Wednesday, November 21st, 2007

We recently ran our site against YSlow (the Firefox add-on for Firebug by Yahoo!) and it flagged up a few ways that we could speed up our site. So we’ve implemented the changes that it suggested (moving all links to JavaScript files to the bottom of each page, adding far future expire headers to all static content and minified all of our JavaScript).

And what a difference! The first time you visit the site, there won’t be that much of a difference, but once you have grabbed all the static files that are reused on each page, thanks to the far future expire headers, subsequent page loads as you move through the site should be noticably quicker than before.

In other news, there’s a big change to the site that we’re in the final stages of sorting out - hopefully we’ll be able to tell you all about it next week!

jQuery. And a new spinner!

Wednesday, November 14th, 2007

EdinburghMenus.com has now adopted the jQuery javascript library for adding trendy new functionality and effects to the site. This is slowly going to replace other little snippets of javascript we have written for the site.

jQuery is going to enable us to add fancy new features to the site more rapidly and with more cross-browser compatability. For example, we were aware of some problems with our help pop-ups not displaying properly on version 2 of Safari on OS X. Our new jQuery based help popups should sort this problem out, as well as being a bit fancier in general.

EdinburghMenus.com spinnerTo match our fancy new help pop-ups, we’ve replaced the generic AJAX spinner with a fancy new EdinburghMenus.com one. Our site is pretty snappy, so you will probably only ever see a flash of this when waiting for search results or popup help text. But if you are ever kept waiting for a few seconds, watching our little marker bounce happily away will hopefully make the wait more enjoyable!

Geocoding Problems

Thursday, November 1st, 2007

On EdinburghMenus.com, it’s really easy to find businesses located close to where you are — you can enter an Edinburgh postcode, street name, area or city landmark.

You may think that such functionality is very straightforward to implement but that is not necessarily the case, certainly not in the UK.

In the UK the Post Office owns the postcode data and sells that information to people who need it. There is an attempt to produce a public domain version of that data, but that is going to take a while. In order to get around this, EdinburghMenus.com used to approximate the location of a postcode by comparing it with a postcode for one of the over 800 businesses we have in our database. This wasn’t ideal, as it didn’t give an entirely accurate location, but it was quick and, most importantly free. Then Google enabled UK geocoding in their GoogleMaps API and all was well — you could send a UK postcode to Google and they would return the precise coordinates for that location.

But how did Google get around the licensing implications of UK postcodes and give away this data to web developers for free? Well, it looks like they didn’t — as of the middle of last week, geocoding a UK postcode with the GoogleMaps API no longer works. Hummmph. It looks as if it was a mistake on Google’s part to enable it in the first place.

As a result of this, locating postcodes was broken for a while on EdinburghMenus.com. We have now found an alternative solution from Emad Fanous which is working well so far, although it is not quite as quick as the Google solution. We’ve also adapted our code so that if Google ever do re-enable their UK postcode Geocoding, the system will use that instead and if Emad Fanous’ version stops working, the site will revert to approximating postcodes from data within our own database.

Login with OpenID

Wednesday, October 17th, 2007

OpenIDWe like to be on the bleeding edge here at EdinburghMenus.com. That’s why we’re proud to announce that as of today it’s possible to sign up to EdinburghMenus.com with an OpenID.

OpenID is a “decentralized single sign-on system”. Essentially, this means that you sign up once with one of the many OpenID providers, and then you can sign up to OpenID-enabled sites (like EdinburghMenus.com) without having to fill out registration information again and create another username and password that you need to remember. When you return to an OpenID-enabled site that you are a member of, you just sign in using your OpenID URL.

When you sign up to EdinburghMenus.com using your OpenID, we automatically lift personal information from your OpenID account that you are happy to share with us such as your real name, gender, post code and date of birth. It is completely optional to supply this information - we only need you to share your email address and nickname (which will become your username on our site) but any extra information you do share with us will be used to make the EdinburghMenus.com experience all the more amazing.

Although you may have never heard of OpenID before, you may already have one — if you already have an account with AOL, Wordpress, LiveJournal or Technorati you’re good to go. The official OpenID page has more information on this.

It’s all very clever. Only time will tell if it’s really going to take off, but we certainly want to be able say we were there near the start if it does!

If you have already joined EdinburghMenus.com in the old fashioned way and want to assign your OpenID to your account, you can do that in your account settings.

Tweak tweak!

Wednesday, October 3rd, 2007

A lot of EdinburghMenus.com was done in a bit of a rush to try and get the site live asap. Now we’ve got time to go back and make things a bit better…

Ok, we know we really should be focusing on some more fundamental features of the site, like making it easier and quicker to add new businesses and menus to the site, but we can’t help but keep tweaking other little bits.

So what’s changed in the last week or so?

  • The directory part of the site has been restructured. Now the directory category index shows how many businesses there are for that category in brackets after the link. Once you’re browsing a category in the directory it’s also possible to jump straight to businesses beginning with any letter of the alphabet by clicking the links. Links are disabled for letters that don’t have any businesses starting with that category. Pretty fundamental stuff, we know, but we didn’t get round to doing it earlier!
  • New results pagination design. Shamelessly nabbing the design from a couple of our favourite “Web 2.0″ sites, Digg and Flickr, it’s now possible to immediately and easily jump to the next, previous, first, last and adjacent search results whether you’re viewing the directory, search results or reviews.
  • New URI structure for businesses. We’ve always been pretty pleased with our clean URI structure. Rather than having long and unmemorable addresses with seemingly random code in them, our URIs are easy to read and hopefully make navigating the site a less confusing experience.
    The URIs for businesses was a little bit rubbish though - rather than using the name of the business to identify the page it used the numeric ID of the business (eg. http://edinburghmenus.com/business/255/). Short, but not very user-friendly. So now businesses have addresses that are just their business name followed by their postcode. Spaces have been replaced with underscores. We’ve also dropped the “business/” bit - it didn’t really make sense - the businesses belong in the “directory” part of the site structure. So the URI for Anima in Stockbridge is now http://edinburghmenus.com/directory/anima_eh35dh/ . This is longer, but better. It should also help our search engine performance. Of course, the old URIs will still work and silently divert to the new address with a 301 redirect.

And that’s about it, I think.

When servers bite back

Friday, September 28th, 2007

The observant amongst you may have noticed we had a couple of hours of unexpected down-time last night. Oops. What was supposed to be a routine software upgrade on our server turned out to be a bit more involved than predicted. As a result, we were off-line for a chunk of the evening.

But we’re back, and running faster and more reliably than ever! Thanks have to go to our friends at our great Edinburgh-based web hosting provider, Xeriom Networks who were ready as always to step in and save the day if we made a real mess of the server!

The geeks among you might be interested to know that EdinburghMenus.com is now running on the latest version of PHP 5 (5.2.4) and MySQL (5.0.44). How exciting. As well as making the site a bit snappier generally, this software upgrade will make it easier for us to incorporate some new features like OpenID logins and Facebook integration.

About the blog
Explore our blog
Search