Making Google Analytics Work in XHTML
I was moving my website, Google Voice for Outlook, over from HTML5 to XHTML5 today, and as soon as I did the basic content negotiation filters in PHP so that it would send the appropriate headers if the client supported XHTML as well as only outputting the <?xml if the client supported XHTML, I checked my developer tools to find a JavaScript error. It was Google Analytics, of course. document.write doesn’t exist in XHTML, after all.
The fix was simple, replace the current four line inclusion code with:
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); var script = document.createElement("script"); script.src = gaJsHost + "google-analytics.com/ga.js"; script.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(script); </script>
This will work fine, unless of course you have no head tag. In which case you should replace getElementsByTagName(“head”) with getElementsByTagName(“html”).
HTML5 Being a Pain in My Ass Again
This time in regards to the highly acclaimed and very well received <video> element.
On my website, Google Voice for Outlook I use the <video> tag to show a demonstration of the system working. I don’t currently have a way to encode in ogg, and/or am too lazy too, so I decided that if the web browser didn’t support h264 video, it’d fall back to the YouTube video. The expected result (from me, of course) was that if it can’t display the video, it’d display the YouTube. Apparently though, in FireFox it does not fall back to the YouTube video and instead just displays a gray box, and the fault this time doesn’t lie with FireFox, but with the standard:
Content may be provided inside the video element. User agents should not show this content to the user; it is intended for older Web browsers which do not support video, so that legacy video plugins can be tried, or to show text to the users of these older browsers informing them of how to access the video contents.
Ugh! This means that if you want to use <video> on any website, ever, properly, you’re going to have to encode it in both h264 and Theora until the industry decides on a set standard.
Purely Atrocious.
Beautiful New YouTube Video Player
I was going through my YouTube subscriptions when a video from BGSU popped up, and it struck me as odd because it had a different and much, much more beautiful video player. At the moment, it seems all videos from BGSU are showing up using this player (on their individual video page). From what I can tell, this seems to be the normal for all YouTube EDU videos. I hope that soon we’ll get to see these for all videos.
The Very Best Thing about Unixkcd
guest@xkcd:/$ make me a sandwich
What? Make it yourself.
guest@xkcd:/$ sudo make me a sandwich
Okay.
Google Voice is still Lacking
I’ve been a religious Google Voice user for awhile now, so it really bothers me that it is still lacking feature wise. Of course, I’ve been helping with some of these missing features (re: Google Voice for Outlook) but there are still plenty more missing as well as some minor issues I have with the service.
Multimedia Messaging (MMS)
For some reason, Google Voice still lacks this functionality. It can’t be THAT difficult, can it? I mean, the iPhone managed to add it before Google Voice, and if you really want to compete in the mobile business, its kind of necessary to have MMS, as SMS is pretty much irrelevant now.
Not only that, but any MMS that is sent to a Google Voice number is just lost. Couldn’t they at least be forwarded to my email address? I don’t like the fact that I could be losing incoming messages to /dev/null, and its even more annoying having to give out two different phone numbers (one for MMS and one for SMS).
Shortcodes
It is all well and good that Google’s own shortcodes work through Google Voice, but not so fantastic that nobody else’s does. I don’t want to be passing around two sets of phone numbers, and I’d love the ability to just set to spam a shortcode that is getting out of hand and won’t let me unsubscribe (if that ever happens). Developers pay tons of money to set up shortcodes, so why doesn’t Google Voice support them?
API
Google Voice is a Service. I use it with my cell, with my home phone, and with my computer. But in order to make desktop apps or things like Google Voice for Outlook possible, an API is almost necessary. I’ve managed to do it without one, but it still pretty much sucks.
Outlook Mobile Service
Companies charge tons of money for people to have the ability to send text messages through Microsoft Outlook. Adding the very simplistic SOAP server to the Google Voice backend would allow anyone with Microsoft Office to send text messages, forward emails, and receive reminders and notifications for FREE, something that is usually charged 10 cents or more per message. (Combine this with MMS as mentioned above, and it gets EVEN BETTER!)
Internet Fax Service
Google Voice already has “Receive Faxes” as a “Suggest a Feature.” Adding this and providing users on computers a way to send faxes would increase productivity and make the service even more useful to small companies and freelancers.
Keep in mind, these are just a few ways that Google could improve Google Voice, there are tons more.
What do you want to see added?
Dear Chrome: What the Hell is This?
I love that you finally added previews for each of your tabs, that amazing Windows 7 feature that all of your competitors adopted before you…
But what the light is this? Why on earth are there this mini-windows, and why are the preview windows themselves so faded out? Not to mention it doesn’t even WORK when you have Chrome minimized…
I love you Chrome, but you need to fix these in the next dev release. NEED.
Sneaky Twitter, or My Imagination?
Fairly surprisingly, twitter went down today (for what appeared to be no rhyme or reason), but something much more surprising happened when it did. A tweet I posted (from my own, self-coded twitter client that has no “store tweets until twitter is back up” system) was there on the site when it came back up (viewable in the image above).
I’m not entirely sure if this is what I want to think it is, but could it be that twitter has a secondary service that stores tweets that come in via the API until the system is back up, or something? I didn’t think the update had posted at all, as the API didn’t return any of the proper data (nor an error).
So, is this just a coincidence, or does twitter have a system in store to keep the stream flowing even when its not?



