External hash tag link and Internet Explorer bug
September 14th 2012
4672

If you are jQuery fan and building a web site with some animations you will (most likely) end up using hash tag links. Obviously everything starts with trigerring certain page elements and assigning onClick/Blur/MouseOver etc. events to display some ’eye candy’ action.

But what if you decide that some of this action could be triggered on page load? In order to specify what exactly should be happening you can always go down the route of hash tag link. As example in our own website should you wish to open portfolio section right after page loading is completed you would need to add #!design-portfolio to the end of the link [www.kartogram.co.uk/#!design-portfolio]. 

So all above is working perfectly fine until you try to open your page using external link (and most importantly, using Internet Explorer). That’s where it all goes wrong. Well, almost. The link will load fine etc. but once you try to press something page will reload. Turns out it’s a known bug and as most of them, already has a workaround.

To spare you the headache, just post the following code within your pages’ section and problem will disappear:

This little trick will refresh the page before you even realise it providing pleasant browsing experience. Most other browsers will just simply ignore it.

By the way if you don’t know how to extract the hash tag extension from the URL we’ll be posting a small tutorial about this in the coming days, so stick around.

And should you need any further information feel more than welcome to use the comments section below or contact us directly at blog@kartogram.co.uk .

 

Regards,

SD

Back To Blog