/    Sign up×
Community /Pin to ProfileBookmark

Back Button in IE6 getting "forgetful"

I’m having a little issue with one of the (supposedly) default behaviors of IE. After navigating through a few links within the same HTML page (which resides in a frame), the IE Back button will not reverse navigate through those links within the same page. I’ve tried anchors that use just an identifier href (href=”#i21) and a page-identifier combination (href=”thispage.htm#i21″) and both yield the same result.

I do have some Javascript attached to the body onload event, but neither of these scripts reload pages, they only modify stylesheet information and window size. The pages do have many div elements that are used for special styling, a few media objects, and some CSS position:absolute displayed header information within the pages that are causing problems. Could any of these be affecting the back button navigation? Could it be something in the frameset file that causes this?

Just hoping someone might have run into this issue before and have come across some common causes for this sort of developer provoked misbehavior.

Thanks,
Matt

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceJan 27.2005 — [i]Originally posted by spiff194 [/i]

[B]...the IE Back button will not reverse navigate through those links within the same page...[/B][/QUOTE]

So, what [b][i]does[/i][/b] it do? Also, does other browsers do it as you expect?
Copy linkTweet thisAlerts:
@MstrBobJan 27.2005 — [font=trebuchet ms]

Can you provide a link to the pages in question? It might merely be IE, but I don't think it's a particular bug. Perhaps you just misunderstand how back navigation works?

[/font]
Copy linkTweet thisAlerts:
@spiff194authorJan 27.2005 — The HTML isn't being viewed on the web (it's part of a manual that is viewed using IE), so I can't send a web link.

I attached a sample page with this post, and in the process of creating the sample I inadvertantly discovered why the back button ceases to work. Happy accidents do have a unique way of solving these little mysteries sometimes.

I did forget to mention that these pages are actually XHTML, and as such have an XML-declaration (<?xml version="1.0" encoding="UTF-8"?>) at the top of the file. It appears that the XML-declaration at the top of the file is killing the reverse navigation somehow. When I remove the XML-declaration, IE's memeory becomes clear and the back button works again.

The sample page I included has a link toward the top to section 1.7, then you can bounce to 1.9, and then 1.16. If you remove the declaration and then follow all the links, you should be able to reverse navigate through the page using back. With the declaration, the history will still have entries for each link jump, but the back button clicks do nothing and the page just sits there.

I tried the file with and without the declaration in FireFox 1.0, and it works either way of course. Unfortunately my particular project locks me in to IE 6 ?, and I have to maintain valid XML files.

I don't think I can lose the XML-declaration and still have valid XML, can I?

Any suggestions on an alternative approach to reverse navigation on a page?

Thanks for your time and responses...

[upl-file uuid=08e52827-d2be-4d29-90df-82ea43b43bdb size=13kB]backbuttondoesntwork.zip[/upl-file]
Copy linkTweet thisAlerts:
@spiff194authorJan 27.2005 — OK, my over-excitement got me into trouble.

Actually, my removal of the XML-declaration caused IE to change modes, which in turn caused some of my CSS to be rendered differently, which in turn caused my absolute divs to become not absolute in IE.

So after further review, it appears that my positioned divs (whether absolute or fixed) at the top of the window cause both IE and Firefox to not be able to reverse navigate through same-page links.

Is this expected behavior for a page with positioned divs? Is there some way I can alter my CSS to keep the top two divs (classification and controls) stationary and the text scrollable?

Or am I going to have to either use another frame for the "header" or add javascript to remember the internal page linking jumps?
Copy linkTweet thisAlerts:
@BeachSideJan 28.2005 — Won't this occur no matter what browser you use?

If I am not mistaken because you have it in a frame there is no real history of the page being there so there is no where for it to go back to. It will only go back for the main frame which is the header.



I [i]think[/i] this is correct!
Copy linkTweet thisAlerts:
@spiff194authorJan 28.2005 — The page links don't reload the entire frameset, they just update the "main" frame where the content is loaded. So you can use the Back-Forward buttons to jump through the linking.

You can load the html page I attached earlier into a frameset and navigate through the page links and you will be able to cycle backwards through the page page jumps with the back button.
×

Success!

Help @spiff194 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...