Posts Tagged ‘FireFox’

The Firefox, IE Cookies Debacle

Wednesday, October 14th, 2009

Argh!

I woke up to a call telling me people couldn’t log into a site I’m developing. I hate those calls. A little poking around saw nothing abnormal until I tried IE (I use FF for development). Boom. Because of a fluke in my code, you COULD log in but the rest of the user session was missing. I tried Chrome. Same thing. I got a report that Safari was showing the problem too. But, FireFox? No problemo.

Thus began a few hours of debugging, testing, hammering a square peg into a round hole. I exhausted all the possibilities:

- server side code not writing the sessions properly (I’m a good coder, thank you very much)

- cookies not being passed back (same thing really)

- security settings (IE I could understand but Chrome? Safari?)

- server updates – Windows updates (No log of any updates in the last 24 hours)

- config changes (None admitted to but I trusted the sources…kinda)

Nothing. I had to take a break and I did. But, I was still mulling this stupid problem over and over. Cookies are being sent back. Not the server. But other people had the problem so it wasn’t one computer config or browser config. And IE and Chrome are so far apart in terms of code bases and development source I couldn’t imagine it was some related bug in both.

Searching the Web I found all sorts of people having cookie issues but none related to this situation. Usually it was just a bug in their code or they were expiring the cookie before it was sent, etc. Another thing was if I set the cookie to expire in a year it worked just fine (it’s our “remember me” function). So it was all about per-session cookies.

Then, as usual, an obscure reference somewhere (which I can’t find now, figures) where someone mentioned to another wanderer of the Web Development wastes that it could be the UTC time on the server is off. At first I thought, well, we’re not using UTC time. I had even looked at the trace (Fiddler is your friend) and noticed the GMT time wasn’t as far off as it was supposed to be. But, it didn’t make sense.

Until I checked the server’s time. It was four hours in the past. Ugh. I switched that bitch over to the official frigging US time and BOOM everything started working again. For fuck’s sake.

I can’t find it now but the same post or another one mentioned that FF handles invalid server times better than IE and the others because it just ignores the problem (after all, what’s the problem with a bad server time stamp on a response? At worst, you’re going to expire content sooner than you should…but that would just floor at “expire immediately” unless you’re an idiot and create a negative time and open up a security hole). Everyone else just says, “Oh, well, this is invalid. You’ll have to fill out a form FU-5491 and find some other browser that works.” Welcome to government agency programming.

So, the lesson: if you’re getting weird per-session cookie behavior, make sure one of the items you check off your debugging and troubleshooting list. Check the server’s time to make sure it’s not TOO far in the past. If possible, normalize against GMT/UTC to be sure you’re not miscalculating due to time zone differences between you and the server (assuming your server lives far from you).

I love wasting half a day on a stupid problem like this. Now to talk to support about that server’s clock…

out

FireFox: Where hath my memory gone?

Friday, July 24th, 2009
Time to cut down?

Time to cut down?

Wow, Firefox is zero for two this month…even if it is by association. I’m a Web developer (shut up about the site, douche) and not so long ago switched over from the drudgery of IE7 to FF3 as my standard, regular, wake up in the morning next to her browser.

IE7 decided to have a stroke and die on my machine (despite a recent rebuild of the machine) that seems to resemble dimentia. It started with 1 out of 10 times I’d load the browser it would sit there stuck trying to connect to a site and no matter what you did (stopped, clicked a bookmark, whatever), it had no idea how to do its job. Over time that escalated until it was 8 out of 10 times.  Meanwhile, Firefox, you mynx, delivered Web site after Web site like a slave girl delivering grapes.

So, I made the switch and never looked back. Until, I started noticing how things would slow down towards the end of the day. Nothing too major but if you left and came back 15 minutes later it would take a little while for things to get humming along. At first, I thought, maybe it’s that Western Digital “Green” drive I got, not realizing “green” means “slower”. But then I checked the processes running. Now, I’m running SQL Server (Developer Edition) and Visual Studio 2005, both memory hogs but surprisingly they were up there but not the worst offender. No, the worst offender at 500 MB of my precious 2GB of RAM was Fire-fucking-Fox.

Where's the Downsize button?

Where's the Downsize button?

Hurgh? What in blazes does a fucking browser need 500 MB to run? I run some add-ons like Firebug and Web Developer Toolbar. So I did the diagnostic thing and turned everything off and then brought them back in one at a time.

Step one: Everything. 160MB -> 46MB. So, we have a culprit. Then waste a lot of time doing this:

Firefox Bare 46.5 Delta
AVG 53.1 6.6
Aviary 53.5 0.4
Battlefield Heroes Updater 54.6 1.1
Firebug 67.5 12.9
Firecookie 68.1 0.6
FoxyTunes 74.3 6.2
Microsoft .Net Framework Assistant 1.1 75.1 0.8
Pixel Perfect 75.2 0.1
Real Player Recorder 77.6 2.4
Web Developer Toolbar 77.8 0.2
Open a blank tab 78.3 0.5
Go to FogBugz (server-side site) 83.4 5.1
Open third tab 92.8 9.4
Go to Amazon.com 114.7 21.9
Close third tab (Amazon) 110.6 (4.1)
Close second tab (FogBugz) 103.4 (7.2)
Close final tab (switches to blank tab) 103.7 0.3
Open a new window, blank 104.7 1.0
Deactivate all add-ons (launch blank) 33.6 (71.1)
Load this site’s admin 44.0 10.4

What does it all mean? Add-Ons + Multiple tabs and windows + a few hours = memory hog. And, it seems I’m not the only one complaining about this…there are even how-to‘s dedicated to memory and Firefox! (I like the offline cache…512MB??)  But, c’mon, the average user isn’t going to even know there’s a problem…except to know that when they run Firefox, things seem to slow down.

Now, while I’m putting a lot of the blame on the add-on creators, it’s not all them. Look at how much memory is required to open ONE friggin extra tab. 9MB? So much for Open Source…maybe the problem isn’t that a bunch of disparate virtualized coders are about as easy to organize as a herd of cats.

Maybe it’s the same problem that Microsoft has…you know that big company where you could not meet 90% of the company even if you spent 10 years there. Maybe the problem is, we’re too used to the idea that with plentiful memory, the maxim that dictates that an organism, given an environment of a specific size, will grow to fit that environment. And don’t get me started with Chrome…

Maybe it’s time we sell PCs with 256MB of RAM and force developers to remember how to keep things tidy and need. Maybe–oh, wait, there’s a new version of FireFox out! I should get some more RAM and download that sucker!

out

Firefox Bare 46.5 Delta
AVG 53.1 6.6
Aviary 53.5 0.4
Battlefield Heroes Updater 54.6 1.1
Firebug 67.5 12.9
Firecookie 68.1 0.6
FoxyTunes 74.3 6.2
Microsoft .Net Framework Assistant 1.1 75.1 0.8
Pixel Perfect 75.2 0.1
Real Player Recorder 77.6 2.4
Web Developer Toolbar 77.8 0.2
Open a blank tab 78.3 0.5
Go to FogBugz (server-side site) 83.4 5.1
Open third tab 92.8 9.4
Go to Amazon.com 114.7 21.9
Close third tab (Amazon) 110.6 (4.1)
Close second tab (FogBugz) 103.4 (7.2)
Close final tab (switches to blank tab) 103.7 0.3
Open a new window, blank 104.7 1.0
Deactivate all add-ons (launch blank) 33.6 (71.1)
Load this site’s admin 44.0 10.4

FireFox: Hates Macs and your cookies…

Monday, July 13th, 2009

As much as I’ve been finding myself dragged over to the FF camp over the last year, there have been some dark clouds over the browser that would be king.

First, it seems either no one is testing FF3 on the Mac or whoever it is that’s testing it doesn’t realize that not everyone can use a mouse when using a browser. I can but others can’t and when you make it so that drop-downs and checkboxes and radio buttons are not selectable via keyboard….only by mouse click…people with disabilities who might be using a key that–wow, everyone, uses–are sort of left out of the loop…ouch.

It’s real simple…just fucking focus on the damned control! Why is that so hard? Just a little code…just a simple hack. Nutters.

Second, this one just fucked me today actually. Turns out, when you’re about to REMOVE ALL YOUR COOKIES because you’re half-asleep and thought the Remove ALL Cookies button looked a hell of a lot like the Remove Cookie (singluar bitches) right next to it, no one at Mozilla thought it might be worth putting in a confirmation alert to be sure you want to fucking WIPE all your cookies. FFS, I don’t remember all my fucking logins and now I’ve got to figure them all out again. Thanks, Mozilla. Your laziness over a few lines of code just added to the time I have to spend remembering (or using those forgot pass links).

I never understand why it’s so hard when you’ve got a full team of developers (one man shows are harsher) and QA people to build solid products, regardless of platform.

So much for that Web platform…next?