IE7 adds a hash tag at the end of the main URL of my site when the page loads

In my base application, when I load it in IE 7 and type url: http://mydomain.com/- which loads the main view - IE7 appends the hash tag to the end:http://mydomain.com/#

Which is strange, because with all other browsers this is not so.

Any ideas why?

One more thing:

I tightly linked the html link to the main view:

<a href="#">main view</a>

Is it a good practice to have a hashtag? or should i put something else in href?

May be: javascript:void(0)

+4
source share
3 answers

'#' , . , . becoz basebone "#" IE7.

, Backbone.Router . Backbone IE7 . .

+2

Backbone , IE - , , history.pushState.

, , pushState, .

, : hashchange.

URL- , , , .

+2

. - . , , , URL-, http://mydomain.org/, , #top #. javascript:void(0) . , javascript html.

How to answer your main question: it doesn’t hurt to have # in the URL if you do not use any special logic for working with anchors. If you click the # link in the document, it will redirect you to the top of the page. Therefore, if you reload the page completely, you will still be at the top, so it won’t hurt if IE decides to add a hashtag.

0
source

All Articles