Home > Development, JavaScript > MSIE doesn’t like filenames with numbers?

MSIE doesn’t like filenames with numbers?

So, I was finishing up some of the final bugs on the Computicket website last night with one of the other developers in the office, Deon. One of the tweaks we needed to implement was the minifying of all the common JavaScript files on the website. Brilliant idea! We’ll just name the JavaScript file whatever the current timestamp is – that should get around the caching issues with browsers caching the files with the same filename.

So, after naming the file (and the filename only contained numbers and a .js at the end), we tested it in Firefox. As most things do in Firefox, it worked. Then we tried it on <shudder>Internet Explorer</shudder>. For some reason, no matter how we changed the JavaScript, it seemed to be throwing an error – but all the JavaScript was still seemed to be working just fine.

As a joke, I suggested we rename the file to start with a letter, instead of a number; and lo and behold, it worked in IE with no errors. And the only thing we changed was the filename!

I always knew IE was bizarre and implemented things weirdly, but filenames? Has anyone else ever come across similar behaviour to this? Would be really interested to know…

  1. June 10th, 2009 at 12:34 | #1

    Sucks balls that is !

  1. No trackbacks yet.
Security Code: