need help with slow anchors

They have: 43 posts

Joined: Sep 2005

HI yall, I use anchor tags on my page, but the first time when you click on a link that sends you to an anchor, my site always stalls a bit before sending you down there. But after that first time, every link to an anchor works instantaneously.

My page is just html, with some thumbnails, and two javascripts: one for displaying the date, and the other for tracking traffic.

Lastly, when I made the links to the anchors, it was in frontpage, and I used "place in this document" for the link, with target as 'page default (none)'. At the time of creating the link, the string is index.html#anchor
but after publishing, I look at the code and it's been changed to mysite.com/index.html#anchor

Why does it stall during the first click to an anchor? Thanks!

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

Can you give us a URL, so we can see it in action?

Roo's picture

She has: 840 posts

Joined: Apr 1999

Well in Firefox I have no problems...however when the target in on the same page don't put the file name..just put the target. It sounds like your browser is reloading the whole page when it doesn't need to if you do this better.

This is what you have:
a href="index.html#surgeon"

All you need is:
a href="#surgeon"

*Edit*
If you are jumping to a target from another page, then you'd use the index.html, plus the target, otherwise you don't need to.

Roo

They have: 43 posts

Joined: Sep 2005

Yes, that was it. Links to anchors are fixed, and fast now! Thx Roo, much appreciated Laughing out loud

Busy's picture

He has: 6,151 posts

Joined: May 2001

The page or at least the anchor must be loaded before it can be found as well, especially coming from another page, if the page is long or has badly nested tags it can appear stalled until fully loaded.

They have: 43 posts

Joined: Sep 2005

Busy wrote: The page or at least the anchor must be loaded before it can be found as well, especially coming from another page, if the page is long or has badly nested tags it can appear stalled until fully loaded.

Didn't know that either; good to know now though, thx.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.