5 Replies Latest reply: Mar 2, 2012 7:41 PM by pamfromlos angeles
Ric Lobosco Level 1 Level 1 (115 points)

I have anchors on my website that work fine with many versions of IE & Mozilla over the last decade, but I just learned from a friend that Safari ignores the anchors on his computer:

 

http://www.PerformanceAllies.com/about/pioneers

 

(At the bottom of the page are 5 links, each to a specific location on another page.)

 

I was told by someone else that any of these links go to the top of the proper page, but not to the respective anchor location on that page.  I checked it with my own copy of Safari (v4.1.3), & discovered the same problem.

 

Is this simply something that the Apple engineers thought unworthy of making compatible in Safari?  Or is there some workaround?

 

(I searched for other answers, they all refer to iWeb.  I currently use WordPress, and previously used other applications to build my site, but never iWeb.)

 

Thanks!

Ric

  • andyBall_uk Level 7 Level 7 (20,495 points)

    Hi Ric

     

    try updating  your code & using 'id' instead of, or as well as 'name' for the anchors. Safari handles them just fine., wikipedia has loads, for example.

  • Ric Lobosco Level 1 Level 1 (115 points)

    I'm not *that* fluent in HTML...

    Here's the link structure I have always used on the "source" page:

    <a href="http://www.performanceallies.com/about/bios#rcl"></a>

     

    ...and at the anchor point on the target page:

    <a name="rcl"> </a>

     

    I don't know what "id" or "name" is re: anchors, where to put it, or how to code it.  As I said, the way these have been coded for the last ten years worked fine with other browsers....

     

    Thanks for the help!

  • andyBall_uk Level 7 Level 7 (20,495 points)

    Hi Ric

     

    you'd pretty much answered your own  question about 'name' & 'id' - but forget that.

    on a brief look I thought it was related, Safari dropping support for 'name' in xhtml... but looking again, it's not that at all.

     

    change your links to this form: http://performanceallies.com/about/bios/#rcl  (iow, drop the www, since they're re-directed by your server anyway)

     

    When most browsers get a 3xx redirect response, they add any #xyz anchor to the new url

    Safari doesn't, so your '#rcl' is lost

     

    Seems that it was reported as a bug before now , although as usual, Safari is likely doing the 'right' thing - 1 & 2 & 3

  • Ric Lobosco Level 1 Level 1 (115 points)

    Still don't know what "id" or "name" are, or where they show up...  Didn't understand the info at "3xx" either.

     

    I did discover I had to delete both "www." from the domain & add the forward slash before the anchor tag in the URL/pathname before Safari would respond properly.  (Firefox doesn't seem to care, haven't gotten to testing on IE yet.)

     

    So it appears that Safari requires different coding than Firefox or IE, or at least they're more tolerant of older standards?  Are there other Safari issues I should keep my eyes open for?

     

    I haven't gotten a satisfactory answer why my domain keeps reverting from <http://www.performanceallies.com> to <http://performanceallies.com> ... it didn't used to.  If this glitch is fixed, with Safari (& other stuff) respond to either type of URL entry?

     

    Thanks!

  • pamfromlos angeles Level 1 Level 1 (0 points)

    Thank you! In Wordpress I changed the site URL in my settings and then the anchors worked in Safari.