The problem is the href: assortiment.php#top
is asking too much. IE8 can’t deal with a link to an element that doesn’t exist yet (the relative anchor is linking to an element on the new page).
JS can solve this problem for you, though:
window.onload = function()
{
if (location.href.indexOf('#top') === -1)
{
location.href += '#top';
}
}
Note that, in IE8, this code will result in a mem-leak check my answer there: an IIFE plugs the leak just fine, but requires a bit more code.
1
solved ie8 with anchor causes crash [closed]