WordPress 4.4 update – new comment redirects break anchors in Safari
-
WordPress has the following setting:
[x] Break comments into pages with [50] top level comments per page and the [last] page displayed by default
In previous version of WordPress, changing that setting resulted in recent comment links appended with “/comment-page-1/” between the end of the post URL and the # anchor tag to the specific comment. This triggers a server redirect to the post URL, stripping “/comment-page-1/” off. Most browsers handle it fine… Safari across all platforms chokes. Safari redirects to the post without the anchor tag, meaning the user is at the top of the page rather than scrolled down to the particular comment.
Original recent comments link:
example.com/2015/12/example-post/comment-page-1/#comment-1234567
Redirects (Firefox, Chrome, IE, every sensible browser):
example.com/2015/12/example-post/#comment-1234567
Redirects (Safari):
example.com/2015/12/example-post/
The logical solution is to uncheck the setting:
[_] Break comments into pages with [50] top level comments per page and the [last] page displayed by default
Unfortunately, the WordPress 4.4 update changed this. Now the recent comments redirect happens whether or not that setting is checked. This breaks recent comments anchor tags for Safari. Sites with many comments now leave iPhone users forced to scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll if to the bottom of the post in order to find the linked to comment.
Obviously, the real problem is Safari, which has been broken for a decade. But the reality is mobile users are a growing part of the WordPress audience… sites can’t jettison their iPhone users just because Safari has a bug.
Is there any way to change WordPress’s behavior removing the “/comment-page-1/” redirect in WordPress 4.4?
- The topic ‘WordPress 4.4 update – new comment redirects break anchors in Safari’ is closed to new replies.