Panoramio's Blog


Archive for the 'javascript' Category

Awful days

January 28th, 2006 by Joaquín Cuenca Abela

Some days you feel it would had been better to not quit the bed.
And some days you just can’t quit your bed.
Yesterday I passed all the day with a strong pain in the back, and I couldn’t even go to work. I passed the morning just checking that all the doctors near me where full, […]

Functions!

January 7th, 2006 by Joaquín Cuenca Abela

I implemented functions, at last!
So now I can execute:

var a = function fact(i) {
if (i == 1)
return 1;
else
return fact(i - 1);
}

if (a(3) == 6)
“pass”;
else
[…]

Little incompatibilities between browsers

January 7th, 2006 by Joaquín Cuenca Abela

On the series of incompatibilites between browsers, I have two new items to show.
First, don’t use location.hash = “#foo” to jump to “foo” link, because Safari will jump to %23foo. Safari’s behaviour seems very logic, but I don’t really know who is right, Safari or the IE / Firefox crowd.
Second, don’t use
<a h ref=”javascript:void(foo())” >foo</a>
You […]

It can’t be so hard…

December 27th, 2005 by Joaquín Cuenca Abela

Do you remember my last post about my javascript compressor?
Óscar Frías, from Trabber fame asked me for my opinion on the dojo javascript compressor, and my reply was along the lines of: “slightly better than mine, as it compress inner variables / functions names”. As this seemed a trivial to overcome difference, I coded this […]

“Link to this page” no longer needed

December 13th, 2005 by Joaquín Cuenca Abela

I finally killed an old “bug” in Panoramio, shared with any other Google Maps page I have seen.
It was difficult to extract a link to the thing you were seeing.
Google Maps has a “Link to this page” link. The URL of this link is dynamically updated to reflect the current status of Google Maps, so […]

Javascript compressor

November 28th, 2005 by Joaquín Cuenca Abela

Let’s see if you are a real hacker.
Your problem: a web page somewhat slow, with lots of javascript code.
You can:

ignore the problem

activate mod_deflate in the server for javascript code (be careful with old browsers!)

use a javascript compressor to remove any extra spaces, new lines, comments, etc.

take an existing javascript parser, and make it rewrite your […]

onload event

September 18th, 2005 by Joaquín Cuenca Abela

You can use the onload event on images to know when the browser has finished the download of an image.
I have used it for the upcoming version of Panoramio, where I only show the images after they have been fully loaded.
There is however a subtle difference between Internet Explorer and Firefox related to this event.
If […]

Loading Google Map’s page with many markers slow in Explorer

August 30th, 2005 by Joaquín Cuenca Abela

As anybody that has visited Panoramio will say to you,
it may take an awful long time to load markers on a Google Maps page.
I didn’t know what was going on. I mean, Firefox was much much faster on this page than Internet Explorer, on the same connection, same computer. Why?
A very long thread over this […]

Why Panoramio is not XHTML/CSS valid?

August 19th, 2005 by Joaquín Cuenca Abela

In my previous post Fade in and out I said that I didn’t care about Panoramio not being xhtml/css valid.
If that sounds weird, it’s just because people have forgotten the real goal of validating a site. Validation is a mean, not an end.
The goal is to have a site as cross browser as possible, so […]

Differences between Mozilla and Internet Explorer

August 18th, 2005 by Joaquín Cuenca Abela

Some time ago I read an article pointing out how to migrate apps from Internet Explorer to Mozilla. The articule is well written and worth a read, but it falls short on explaining all the real problems you can find when making a webapplication that works on both browsers (let alone something that works on […]