I came across an interesting bug in someone’s code today. They had an iframe that was dynamically created and it’s url was different depending on whether the variable
home was true or not. They had declared
home a few lines earlier but the condition was always returning true no matter what. Turns out, there is already a variable of the same name in Mozilla-based browsers. It’s a function that when called, takes you to your home page set in your browser preferences.
I don’t have time to hack around with it at the moment, but I’d imagine that this is a slight security risk. Similar to Jeremiah Grossman’s CSS History Hack that can potentially tell all the sites you’ve visited recently, this one would tell what user’s home pages were set to. Initial thoughts are that this would be hard to do since the only way to call this function without leaving the page is to call it in an iframe (tried it and it works) but iframe sandboxing restrictions prevent code from the parent frame from seeing or accessing the contents of this iframe (or it’s
window.location object) since it’s from a different domain. A quick check shows that this function doesn’t exist in Safari or Internet Explorer.
Oh man guys, I know that this is probably old news to the rest of you, but I just started using two of the coolest things together – and it rocks my face off!
Google Gears is a Firefox plugin that let’s you take web pages offline (essentially letting web developers save data to the visitors hard drive in a sqlite database). I thought about using it for this memory web app I’m building in my free time but decided it wasn’t worth all the extra effort at this point in time (you have to add in extra code to detect when users are offline and online, etc.)
Google Reader is Google’s aggregator capable of reading RSS and Atom feeds – essentially you use it to keep track of all the blogs you read in one place. I’ve been using iGoogle for the past two+ years and am slowly integrating all my feeds into Google Reader.
A few times a month I go on a two-hour train ride to see my girlfriend and family and have nothing to do while in commute (Why can’t you support tethering, iPhone?) Now I can combine the two things together and download all my blogs for viewing offline. Goodbye two boring hours!
Again, both these technologies are really old and everyone logically knows to use Gears with Reader but just in case you haven’t done so, here’s your reminder!
Next up, trying to access wikipedia offline.
I always forget that when you change the character encoding of a webpage (say from ISO-8859-1 to UTF-8 or UTF-16) that you also have to change the character encoding of the actual file.
As an added note, be aware that switching from a single byte character set like ISO-8859-1 to a double-byte like UTF-16 will double your file size. Thankfully gzipping your files makes this final file size increase much more palatable.
So the new Firefox 3 that was released last week is awesome. It’s much faster, doesn’t seem to hog memory as much as the old one, and has a completely revamped bookmarks system which I enjoy. Mozilla reached it’s goal of getting in the Guinness World Records for the most downloaded application in a single day (8 million) and if you haven’t downloaded it yet I suggest you try it now. They also fixed a ton of bugs including the really annoying Mac flash overlay issue on transparent CSS backgrounds. Now if only FF3 was an auto-update…
Display and functionality-wise, all my pages seem to display exactly the same except for two issues:
Update: The issue seems to be caused when having the new Firebug 1.2.0b3 with Firefox (and possibly having the YSlow addon, too.) If you disable Firebug the errors go away and all functionality is restored. I hope this issue gets fixed soon! If you found this entry through a search engine and are also experiencing the issues please post here so we can see how big this issue is.
Generally though, FF3 is definitely worth the upgrade and besides the two issues above I experienced on my own project, I see no issue on the regular sites I visit.