So, I've working on an AJAX application and the thing works great for 99.9% of my users. Occasionally, a user reports that they click "save" and nothing happens. The "save" in this case is a link that will use AJAX to send the data entered to my server and then the part of the page the user is changing updates after the server successfully updates the DB.
Now, usually, when someone tells me that "nothing happens" I get a little condescending. It's rarely the case that "nothing" happens. Rather, something does happen that, if the user would describe accurately, I might be able to use to analyze and resolve the problem.
In this case, however, I witnessed the problem myself when a recent user shared his screen with me. Sure enough, nothing was happening. I immediately started debugging using FireBug in FireFox. The problem was the same for this user, regardless of which browser and, so far, regardless of which computer he used.
My debugging revealed a greater mystery. Javascript stopped processing every time right where I use the open() method of XMLHTTPRequest (XMLHTTPRequest.open() or, as many libraries do it, xhr.open()). This is even inside of a try/catch section and basically, NOTHING happens.
So, after a few days of dazed confusion, I remembered something that happened when I was still developing my application. If my AJAX call called a domain that was not the same as the domain the web page sits on, NOTHING would happen. No error, no warning, no AJAX call, no nothing. So, I got to thinking about how it might be possible that, for some users on my application, the AJAX call is going out to the wrong domain or something like that.
Finally, a colleague suggested trying, on my own computer, hitting the AJAX thingy while surfing at our domain without the WWW in the address. I tried it. I went to http://mydomain.com and clicked "save" and NOTHING happened. I changed the address in my address bar to http://www.mydomain.com and that fixed it.
Just thought I'd share and save others the trouble.
UPDATE: I use JSMX for my Ajax stuff. It turns out that this problem wouldn't have been so silent if I had noticed and changed the error handler thrown by the open() method. The original developer set up one case as completely silent--interpreting it as an incompatible browser. Without the try/catch, Firefox says "Uncaught exception: Permission denied to call method XMLHttpRequest.open()" when the cross-site scripting is attempted.
Friday, February 08, 2008
Thursday, November 08, 2007
Being Overweight Isn't All Bad, Study Says - washingtonpost.com
Being Overweight Isn't All Bad, Study Says - washingtonpost.com: "data from decades of federal surveys concluded that people who were overweight -- but not obese -- had lower overall mortality rates than those of normal weight."
Thursday, September 27, 2007
14886 Days till I die (if I'm lucky)
A colleague introduced me to this blog post today. I have placed a non-repeating appointment in my Google calendar for the day I die and will see, on a regular basis, how much time I have left to get my shit together and have a good time:
Conceptual Trends and Current Topics
Conceptual Trends and Current Topics
Tuesday, September 25, 2007
Don't have TiVo? Want to know what you're missing on the web?
Couldn't help but to lift this chart from a good article over on Macworld.com
It's good for more than just the Mac too:
It's good for more than just the Mac too:
What’s streaming on the web
| Site | Technology | Quality | What’s on | ||
|---|---|---|---|---|---|
| ABC | Move Video | Very good | Select prime-time shows including Lost, Desperate Housewives, and Ugly Betty; previous two to five episodes | ||
| BBC News | Windows Media, RealVideo | Very poor | Headline news updated 24 hours a day | ||
| CBS | RealVideo | Fair | Select prime-time and daytime shows, including the CSI franchises, The Unit, and As the World Turns; select episodes | ||
| Channelchooser | Windows Media, RealVideo | Poor | Live streams of television stations, including movie classics, cartoons | ||
| The CW | Move Video | Good | Select prime-time shows such as Supernatural and Everybody Hates Chris; four to six episodes per show | ||
| Dailymotion | Flash video | Fair to poor, depending on the source | Some television shows, including many classics from the 1940s and 1950s | ||
| Fox | Move Video | Good | Select prime-time shows, such as Bones, Prison Break, and Hell’s Kitchen; some with all episodes, some with select episodes | ||
| Google Video | Flash video | Fair to poor, depending on the source | Some television shows such as Charlie Rose, public domain films | ||
| Joost | P2P software | Very good to poor, depending on the source | Shows from a variety of content providers, including Babylon 5 and The Ben Stiller Show and movies such as Dragonslayer | ||
| MLB | Windows Media | Fair | Live baseball games, highlights | ||
| NBC | Flash video | Poor | Select prime-time shows such as Friday Night Lights and The Office; all episodes | ||
| NHL.com | Windows Media | Fair | Live hockey games, highlights | ||
| wwiTV | Windows Media, RealVideo | Poor | Live streams of stations from around the world, including movie classics, cartoons |
Wednesday, September 19, 2007
Google Docs Is Inspiring
Kudos to the folks at Google for making this simple presentation on how to use Google Docs for simplifying the creation and sharing of and the collaboration on word processing, spreadsheet and presentation documents.
Watch and listen to this video for more. Even if you're not into Google, the presentation technique alone is worth the time:
Official Google Blog: Our feature presentation
Watch and listen to this video for more. Even if you're not into Google, the presentation technique alone is worth the time:
Official Google Blog: Our feature presentation
Thursday, September 06, 2007
I got a widescreen monitor at work and new software. . .
So, the boss decided that no one should be stuck staring at a CRT in the office anymore.
My colleague, David, was given a budget and the authority to eliminate as many CRTs as possible. I got a new wide screen monitor in the shuffle!
So, I read on LifeHacker about this free software for taking advantage of the valuable new space on the screen. Sizer let me customize the "resize window" options on my computer so I can click on a window and instantly set it to take only half of the screen width and reposition it to the left or right side of the screen. It's fast and, now that I have so much more screen space, I can have two different windows on my screen at the same time.
My colleague, David, was given a budget and the authority to eliminate as many CRTs as possible. I got a new wide screen monitor in the shuffle!
So, I read on LifeHacker about this free software for taking advantage of the valuable new space on the screen. Sizer let me customize the "resize window" options on my computer so I can click on a window and instantly set it to take only half of the screen width and reposition it to the left or right side of the screen. It's fast and, now that I have so much more screen space, I can have two different windows on my screen at the same time.
Unread Items in Google Reader Has Changed -- Finally!!
I always found it ridiculous that Google Reader did not show the count for unread items in my reader account for anything higher than 100. They would just show "100+" I noticed this morning that they now show the actual count.
So now I know how far behind I am on my reading and can also gauge a bit better whether I'm subscribed to too many feeds.
Not sure why I didn't hear about this on the blogosphere already. . .maybe it's because I'm behind on my reading!
So now I know how far behind I am on my reading and can also gauge a bit better whether I'm subscribed to too many feeds.
Not sure why I didn't hear about this on the blogosphere already. . .maybe it's because I'm behind on my reading!
Subscribe to:
Posts (Atom)
