Opera Today, I read about a problem with Opera’s onload event not firing when navigating with back / forward buttons. The reason for this is that Opera receives documents directly from cache. Another, similar kind issue is related to firing onload event, when adding images dynamically. In this article, we will solve Opera’s onload issue caused by caching, and another problem, which occurs when adding images dynamically with javascript. Currently, this is tested to work with Windows versions of Opera 10.1, 10.2 and 10.5 pre-alpha. Please, give me feedback if you find issues with other versions of Opera.

How to force refreshing

This isn’t complicated at all:
if (window.opera)
	history.navigationMode = 'compatible';

How to solve image.onload

After banging my head against wall, I found an easy solution:
var test = new Image();
if (test.addEventListener)
	}, false);

The key is to define src attribute after you’ve bound event listeners.


You can view demo at Demo section: Onload issues with Opera