Phase 2 going well

Over the course of the last few days I’ve managed to knock the URL duplication issue on its head. I didn’t actually go with the numbered amenity solution (e.g. tesco(2)-birmingham), I actually created a script that made sure the street address for any amenity within a larger area (the town or city) was unique for that amenity name. So if there were more than one Tesco in Towcester then I’d have to make sure that each Tesco had a unique street address. If not – we suspend one entry in the database and mark it as a real duplicate. (There are some real duplicate amenities in the database and I’m constantly trying to eliminate them – I feel more on top of this than ever following some new preening code I wrote over the weekend which scans the database every hour or so for new amenities that might have already been added in the past). So eliminating the duplicate leaves us with a Tesco store with a unique street address with a possibly duplicated name in a possibly duplicated area name (i.e. more than one Tesco). So the street address is our unique identifier here – but how to get this unique information into the URL? Simple – bracket it and add it into the name string. At first, I thought this might look clunky. But it think it looks good and also useful beneficial to the user searching for the amenity.

Lets take an example –

In Edinburgh there are 3 Odeon Cinemas in the database. If you’re searching for one of these Odeon cinemas you’re likely living in Edinburgh. Agreed? Hope so… Anyway. You know that in Edinburgh there are multiple Odeons so you’re more likely to differentiate your search terms by adding the street address e.g. Odeon Cinema West End Place Edinburgh The URL becomes This clearly displays the street address differentation well.

So URL duplication stopped… What next?

As mentioned I took out the mootools search box javascript function. It was great, really good looking and worked a treat but I didn’t have time to trim the JS code and as a result loading 150kb of mootools for each page was not economical. So I need a new search function. The mootools script was connected to a back end server side PHP JSON messaging script. I think I’m just going to make this the receiving page for a simple vanilla html form post input box on each page. Simple- straightforward.

Oh yes, also looking at a PHP dynamic XML sitemap for the search engines. I was keen to scour the internet and download some code that someone else had made freely available but can’t see too much. I guess that makes sense. If its dynamic then its likely connected to a database containing page data (CMS etc) so the code will likely need to be specific to each website. I have no issue with writing my own one – its just something that’s probably realistically going to take an hour or two and I need to prioritise at the moment.

The next largish mini-project I want to work on is adding more retail stores and their opening times to the database. The post office data admission has worked out really well – I think I now need to apply exactly the same process to high street stores like WH Smith and Borders etc. I’m also thinking deeply about adding another amenity category to the site. I always said I wanted 6 max and I’m at 7 already so I think 2 need to be merged! Shops and supermarkets seem the best fit but I guess a strong case could be made for takeaways and restaurants too. Or pubs and restaurants. Well whatever. I’m thinking about adding banks. Banks are a nightmare for all of us. They’re rarely open on weekends, open late on weekdays and usually they close before 5. If the rest of the British public are like me you take 30 minute out of your working day to leave the office and go to the nearest bank to wait in a queue for 15 minutes to bank a cheque for 35 quid that someone sent you for an old mobile phone you sold on eBay. Bottom line – bank opening times are important. So are their addresses (and map of their address) and phone number. So I might give it a go. The last thing I want is every location page to be full of 500 links to every business in the neighbourhood so I’m keen to keen outgoing page links relevant to the location and within say a 125 (just made that up) limit but I do think banks are the very last category. As mentioned, there’s definitely room for category merging with what we already have.

Good night

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>