Squarespace Help Center: Fix constant redirecting / reloading / refreshing

Stop the page from constantly redirecting / reloading / refreshing

ผู้เขียน
adgitate
จำนวนติดตั้งประจำวัน
0
จำนวนติดตั้งทั้งหมด
4
คะแนน
0 0 0
เวอร์ชัน
2024-01-18a
สร้างเมื่อ
18-01-2024
อัปเดตเมื่อ
18-01-2024
สัญญาอนุญาต
ไม่มี
ปรับใช้กับ

Explanation:
Enhanced Tracking Protection in a Firefox Private Window (or Never Save History) blocks the loading of "https://squarespace.zendesk.com/auth/v2/host/without_iframe.js" (from https://support.squarespace.com/hc/en-us/signin) which is important for getting the cookies of an already logged in user. Since they are not set but javascript knows that they should be, it repeatedly attempts to get them.

Details:
When the appropriate cookies aren't submitted in a request for a help article, the HTML response includes:

<script type="text/javascript">
    HelpCenter.user = {"identifier":"...","email":null,

instead of

<script type="text/javascript">
    HelpCenter.user = {"identifier":"...","email":"youremail@example.com",

Then in one of the theme.zdassets.com js files (relevant lines extracted): (variable i comes from https://login.squarespace.com/api/1/login/auth-status)

if (u = window.HelpCenter.user).email !== i.email
    t.next = 16;
case 16:
    (s = xe.a.getSignInHref()) ? window.location.href = s

So as a workaround (to avoid changing my browser settings) I get it to take a different path so that I can initiate the request for cookies myself:

    if (r = window.ZD_SSO_SETTINGS.internal, !at.a.isSsoEnabled()) {
        t.next = 25;