İçeriğe geç
KAMPANYA

Logo Tasarım + Web Tasarım + 1 Yıl Domain + E-posta + Hosting — $299 +KDV

AIOR

After xenforo Facebook login url ends with com/#_=_

Sektör topluluğu — sorularınız, deneyimleriniz ve duyurularınız için.

After xenforo Facebook login url ends with com/#_=_

Aior

Administrator
Staff member
Joined
Apr 2, 2023
Messages
175
Reaction score
2
Points
18
Age
40
Location
Turkey
Website
aior.com
1/3
Thread owner
The fragment `#_=_` appended to the URL is a response from Facebook's OAuth service and is not an error. Facebook appends this to the redirect URL after the OAuth dialogue as per their specification. This happens even if the redirect URL already includes a fragment identifier.

1687520419705.png

While this doesn't usually affect the functionality of your application, it might be considered unsightly. If you wish to remove it, you could include a simple JavaScript snippet in your code that checks for and removes the fragment on page load:

Code:
<script type="text/javascript">
  if (window.location.hash && window.location.hash == '#_=_') {
      if (window.history && history.pushState) {
          window.history.pushState('', document.title, window.location.pathname);
      } else {
          // Prevent scrolling by storing the page's current scroll offset
          var scroll = {
              top: document.body.scrollTop,
              left: document.body.scrollLeft
          };
          window.location.hash = '';
          // Restore the scroll offset, should be flicker free
          document.body.scrollTop = scroll.top;
          document.body.scrollLeft = scroll.left;
      }
  }
</script>

This script checks if the hash of the URL is equal to `#_=_`. If it is, it removes it. In modern browsers it does this without causing the page to scroll to the top. In older browsers that don't support the history API, it manually restores the page scroll position after removing the hash.

You can add this script in your page template or layout file just before the closing `</body>` tag.

This approach should take care of the `#_=_` fragment.
 

Attachments

  • 1687520419705.png
    1687520419705.png
    614 KB · Views: 3

Forum statistics

Threads
171
Messages
178
Members
27
Latest member
AIORAli

Members online

No members online now.

Featured content

AIOR
AIOR TEKNOLOJİ

Tüm ihtiyaçlarınız için Teklif alın

Hosting · Domain · Sunucu · Tasarım · Yazılım · Mühendislik · Sektörel Çözümler

Teklif al

7/24 Destek · Anında yanıt

Back
Top