24.12.10

jQuery - do I really have an AJAX cache problem?


I don't often write about code - I am no coder - but I struggled with something for the best part of a day and I thought I would post this just in case someone at some point might find it useful.

I stumbled across jQuery after finding YUI just a little to big for me to get my mind around and I am glad I did because it seems simple enough for me to grasp. Anyway, I was using .load to call a SUB PAGE into a MAIN PAGE using AJAX. My set of routines that  something like this

  1.  MAIN PAGE calls SUB PAGE via .load. SUB PAGE has table for data entry and hyperlinks for kicking off SQL PAGE to execute relevant sql
  2. Following data entry into SUB PAGE (via MAIN PAGE), click on hyperlink updates database using SQL PAGE and then refreshes MAIN PAGE div that contains SUB PAGE

Well ... for hours I kept inputting data, then clicking the relevant links only to find that the MAIN PAGE div sometimes refreshed, sometimes didn't. F5 always worked though. So I was pretty sure I had a cache problem. So I stopped using .load and started using .ajax, using the 'cache: false'. I could see that .ajax was now suitably randomising the get url, yet still my MAIN PAGE div was not refreshing. I was certain I had a caching problem ...

But I did not.

2.11.10

5 ways to tell that a mens toilet has been designed by a woman

  1. The urinals are too close together



    There is nothing more disconcerting than rubbing shoulders when you are in the middle of both a private and delicate act

  2. There are an even number of urinals

    As an extension of point 1, there is such a thing as Urinal Chess. It goes something like this ...



    Move 1: take either the farthest or nearest available urinal, never the centre urinals


    Move 2: if both the nearest and farthest urinal is not available, take any urinal that leaves at least one between you and the next bloke (i.e. leave a space in between you and the next guy)


    Move 3: if neither the nearest nor farthest urinal is available and if no available urinal meets the constraints set by Move 2, use a stall (unless drunk - at which point Moves 1 and 2 hold but Move 3 goes by the wayside)



    If we accept these as tenets, then the following also holds true about urinal arrangements and their 'true' capacity for use




    As you can see, any even numbered urinal serves no increase in capacity and is a waste.

  3. There are more stalls than their are urinals



    Most of us men would spend more time standing up than sitting down. Please let that be reflected in the fittings and fixtures.

  4. The entry door is located so that it bangs the person at the nearest urinal

    If someone should walk through that door at the wrong moment, this can make things veeeeeeeeery interesting ...

  5. You can see heads over the stalls

    Men are taller than women, so stalls need to go higher than women's stalls. Otherwise ... well it can all just be a little disconcerting, really.

17.10.10

The Worst 5 Gadgets: #3 Sony Playstation 3 (slim)

Good times
  • The web browser is quite good, allowing streaming from the web
Bad times
  • Cannot stream video files across wireless without unacceptable stuttering
  • Constant download and installation of system updates
  • USB ports are only on the front, making connection to multiple devices a messy business
What I should have bought
  • Maybe an Xbox. But probably either an Apple Mini or a Dell Inspiron Zino HD 
This is going to be controversial.

As a gaming machine, I am sure that the PS3 is nigh on impossible to fault. But Sony sell it as a games machine plus a fair bit extra. Not being a gamer, I am interested in the 'fair bit extra' and it is here that the PS3 falls down.

The Worst 5 Gadgets: #5 Aliph Jawbone

Good times
  • Meh ... none yet, but that might be my fault
Bad times
  • The snazzy noise suppression tech relies on fitting the device in a certain way ... and I can't make it fit my head that way
What I should have bought
  • There is an argument that says no self respecting person buys a bluetooth headset anyway, so maybe the answer here is that I should have gone with the wired mike that comes with most phones
I can't even remember why I was in the market for a bluetooth headset. I was living in London at the time and not really driving. So after reading a bucket load of rave reviews about it, I bought the Jawbone.

The Worst 5 Gadgets: #1 One For All URC-9900 Remote Control

Good times
  • It was cheap, at around £30
Bad times
  • Atrocious battery life ...
  • ... compounded by using AAA batteries and no recharge cradle
  • So big that you could not hold it in one hand
  • Did I mention it came in a lovely gold colour?
What I should have bought
  • Nothing at all, really - is there any good universal remote control?
Some things are just not worth spending your money on no matter how cheap they are. And so it was with the One For All URC-9900 Director (Mosaic), to give it its full name. I picked it up from Richer Sounds in the UK on special at about £30. I am pretty sure it sold for well in excess of £100 when it was first introduced. The poor bastards who sprang that money ...