Tuesday, February 9, 2010
Friday, February 5, 2010
Thursday, February 4, 2010
Opera 10 Anchor Tag Rendering Bug
For some time now, Wesabe's transaction edit dialog has been broken in Opera (10.10 as of this writing). Since it was fine in all other major browsers, and none of us were Opera users, fixing it was never high priority. I thought I'd take a look at it again tonight, though, and just when I was about to give up and go to bed, I managed to track it down.
If you have an anchor (
Will render as:
If you give the anchor an href, though, even if it is just a blank string (
Here's a page that demonstrates the bug: http://footle.org/misc/opera-bug.html.
Anyway, I filed a bug with the Opera folks. Time for bed.
If you have an anchor (
<a>) tag that contains block-level elements (which is technically not allowed, but all other browsers seem to be ok with it), such as <p> or <div>, the anchor will close itself before the elements it is supposed to contain. E.g.:
<a>
<p>hello</p>
</a>
Will render as:
<a> </a>
<p>hello</p>
If you give the anchor an href, though, even if it is just a blank string (
<a href="">...), it renders fine.Here's a page that demonstrates the bug: http://footle.org/misc/opera-bug.html.
Anyway, I filed a bug with the Opera folks. Time for bed.
Friday, January 29, 2010
Tuesday, December 22, 2009
Better Dictionary: Wordnik
Ok, thanks to Google for putting their dictionary out there, which I wrote about a couple of posts ago, but the quality of the results pales in comparison to Wordnik, which I've just discovered. It won't do language translation for you, but as far as the English language is concerned, this is pure word porn. So here's an updated bookmarklet for you:
wordnik
Just drag that to your bookmarks bar, select a word or phrase on the page, and click. Happy bonus: just clicking on the bookmarklet without highlighting a word first will give you a random word (thanks to Wordnik, not me). Cool!
wordnik
Just drag that to your bookmarks bar, select a word or phrase on the page, and click. Happy bonus: just clicking on the bookmarklet without highlighting a word first will give you a random word (thanks to Wordnik, not me). Cool!
Tuesday, December 15, 2009
Chrome Frame's Shifty User-Agent
One of the security measures we have in place at Wesabe is to invalidate a session and log the user out if their User-Agent or IP address subnet changes between requests. However, we recently had a number of complaints that users were getting logged out prematurely. Looking at one user's session in the logs, I noticed that their user agent string had "chromeframe/4.0" appended for some requests, but not others. It turns out that Google's Chrome Frame only modifies the user agent for top-level requests, and not for subsequent requests sent as that page loads:
This fix on our side was to just strip the chromeframe identifier from the user agent string, although it makes me wonder what other browser extensions cause similar issues and whether invalidating a session when the user agent changes is even a worthwhile security measure.
It was a compromise to keep code complexity down. In order to tag every request from IE...we have to have hooks in place at many more places (not to mention supporting the different things IE6, 7 and 8 do). So, as a compromise we decided to keep it down to only the single hook that allows us to tag top level requests.
This fix on our side was to just strip the chromeframe identifier from the user agent string, although it makes me wonder what other browser extensions cause similar issues and whether invalidating a session when the user agent changes is even a worthwhile security measure.
Friday, December 4, 2009
Google Dictionary Bookmarklet
Google recently launched a decent dictionary, so for you logophiles, here's a bookmarklet that will bring up the definition of whatever text you have selected on the page: gDefine. Just drag it to your bookmarks toolbar, then double-click a word somewhere and click the button to get a definition.
It is set to use the English dictionary, but if you want to use it in a different language (or even translate between languages), just change the
Here are a few to get you started:
gDefine (French)
gDefine (Spanish)
gDefine (German)
And translations:
gTranslate (French>English)
gTranslate (English>French)
Enjoy!
It is set to use the English dictionary, but if you want to use it in a different language (or even translate between languages), just change the
langpair parameter from en|en to, say, fr|fr for French, de|de for German, etc. (try a search on the Google Dictionary site in the language you want and look to see what the langpair parameter is in the url). Also, the hl parameter controls the language of the results page, so if you want your results to be in that language as well (as opposed to English), change that accordingly.Here are a few to get you started:
gDefine (French)
gDefine (Spanish)
gDefine (German)
And translations:
gTranslate (French>English)
gTranslate (English>French)
Enjoy!
Subscribe to:
Posts (Atom)