DevHints

Archive for the ‘Web Browsers’ Category

There’s been this long standing bug with IE and changing the src attribute to update the image. Under certain conditions, it causes the image to simply disappear. There are two well known solutions to this problem:

1.) Have an alert box popup immediately after the change.

2.) Use a setTimeout function.

Neither of these is exactly pretty. But fear not, there’s a new way to do this that’s really ingenious. Are you ready for it? Here it is in an example:

var src=”http://example.com/image.gif”;
document.getElementById(‘myimage’).src = src;
return false;

Did you catch that? Just add “return false;” immediately after the update to the image src! Hopefully this will save you an entire day of frustration. 😉

Advertisements

I have a friend who has been, like many others, totally sucked into the world of marketing called Apple. I don’t have anything against Apple, and I actually own a Mac and quite like a lot of the stuff that it does, but I’m the last person to fall for a marketing gimmick.

Like we all know, Apple is king of ooo-aaaaah marketing. They come up with glorified terms like “Breakthrough Internet communications device” that means that the phone has a browser and wifi. There’s nothing wrong with it, but I wish more people would see through it in some cases. Like the case of Safari.

“The best browser in the world.” That’s what Apple likes to call Safari, and from a marketing point, they should. The problem, however, is that people Mac Fanboys all propagate that line throughout everything and they really believe it. I mean, why shouldn’t they?

Safari is great! It really is the best. I mean, it looks good. It has and RSS reader build in, even though it doesn’t work that great. It can read HTML, XHTML, XML and more! It can execute JavaScript! It works with Flash! Um, it has a build in search box that only searches Google. OH! It does TABS…if you go into the preferences and enable them, anyways. I almost forgot, it has it’s own rendering engine so that websites look more like Apple thinks they should. Eh…and it does JavaScript it’s own way too. Hmm…it doesn’t follow those silly CSS standards! It restyles input elements the way Apple thinks they should look! F5 doesn’t do that irritating “Refresh” thing! Tab won’t select links so I can’t accidentally use my keyboard to browse instead of the non-ergonomic mouse that causes carpel tunnel!

Seriously now. Safari is just not a very matured browser. It’s sort of like a beta version of Mozilla blended with IE5. Sure, it looks good, but it really lacks what so many other browsers include. You can’t really customize it like Firefox with extensions and user styles. It doesn’t offer support for all of the standards like Opera…nor is it as fast at executing Javascript. It doesn’t even offer the nifty shortcuts that Internet Explorer offers.

Honestly, it’s a pain in the ass. Especially if you’re a website designer. It gives us just one more browser to test code in, and usually we have to make changes and sacrifices to allow Safari’s retarded engine to display the page as intended.