[ Content | View menu ]

Internet Explorer, disapearing sessions and image tags

Written on March 29, 2007

This counts as the most ridiculous browser bug in the world ever:

At moo we have been having problems on and off for the past few months with parts of people’s php sessions randomly disappearing. Always Internet Explorer users, but other than that totally random.

We finally tracked it down yesterday to a single comment on php.net. Essentially, if you have an image tag on your page with the src attribute empty ( <img src="" />), and you are running PHP IE might decide to reset your session. Which is very helpful indeed.

Filed in: code, work.

3 Comments

Write comment - TrackBack - RSS Comments

  1. Comment by Paul:

    What purpose was the img tag with no src serving?

    April 11, 2007 @ 9:22 pm
  2. Comment by richard:

    It was on a reusable template - on most pages it had an image in it, but in some circumstances it was being set to empty by javascript. (obviously *should* have been replaced by a hash).

    April 11, 2007 @ 9:25 pm
  3. Comment by Charles Shell:

    Am overjoyed to have found this page. I’m currently developing a website using a variable for an image source. Sometimes this has been empty (due to incomplete data) and yes, the session disappears or reverts to an earlier version. Good old IE - all I have done for the last two days is scratch my head and try to think logically. Oh yes, it only happened on page refresh - first time into the page everything was okay!

    September 28, 2007 @ 2:10 pm
Write comment