29 Dec 2009 @ 9:32 PM 

On our live stream page, we have a nifty little javascript counter that lets you know when the next service is.

Leo noticed today that in Internet Explorer, it’s counting down properly, while in Firefox, it’s saying the event is already happening. On a hunch, we changed the target date to 12/31, and it started working properly again.

So, IE’s Javascript is smart enough to figure out that on December 29, the target date of January 3 is likely to be the one next week. Firefox is clinging to the past and assuming that I really meant the January 3 that happened 51 weeks ago.

How is it that the same script can be interpreted so differently within the same language on two different browser platforms? This stuff is supposed to be standard!

Posted By: Ian Beyer
Last Edit: 29 Dec 2009 @ 09:32 PM

EmailPermalink
Tags
Tags: , ,
Categories: Internet Campus


 

Responses to this post » (One Total)

 
  1. matt says:

    The getYear() implementation is different between the JS engines used by each of those browsers. I think you have to use either getFullYear() or getUTCFullYear().

Post a Comment

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


 Last 50 Posts
 Back
Change Theme...
  • Users » 2
  • Posts/Pages » 106
  • Comments » 110
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About the geek



    No Child Pages.

Airplanes



    No Child Pages.

Books



    No Child Pages.