Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.
This repository was archived by the owner on Apr 28, 2022. It is now read-only.

Page reloading in infinite loop in Firefox and Safari if tracking browser location object #660

Description

@yftachman

Hello,
I recently encountered a problem in my app that in firefox and safari the page got into an infinite reload loop. In chrome this did not happen. After much investigation I have found that the problem was in a specific tracking we did.

window.analytics.track('Page Viewed', {
    title: document.title,
    label: toState.name,
    page: window.location.pathname,
    url: window.location,
});

Changing the "url: window.location" to "url: window.location.href" has fixed the issue. I'm pretty sure this problem has started happening recently, possibly in the last week but not sure on the specific timeline.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions