What is the situation when the login credentials are partitioned by the top-level site when embedded by other sites?

📅 October 12, 2026 👁️ 15

When a page is embedded in another site, the login credentials are partitioned according to the top-level site, which means that the same set of credentials no longer shares global data, but is stored separately according to 'who is on top'. When accessing the site directly, what is read is the one at the top level of this site; when the page is embedded in someone else's site, reading and writing is done based on the one partitioned according to the top-level site of that site. The partitioning mechanism solves cross-site tracking, but the cost is that the embedded party can no longer share the login state of the main site.

What does partitioning break the same set of credentials into?

When not partitioned, credentials are stored according to the site's own affiliation, and it is the same copy regardless of where the request is initiated. After adding the partition attribute, the storage key becomes a combination of the top-level site and the site itself: it is one copy when the top level is A, another copy when the top level is B, and another copy when accessed directly. According to the official documentation, this attribute indicates that the credentials should use partitioned storage. It does not have the authority to add or delete any data, but only changes the isolation relationship between them.

Why must the security tag be included at the same time

The document emphasizes twice: If the partition attribute is set, the security tag must be set at the same time, and the partition credentials must be transmitted in a secure manner. The reason for the design premise of partitioning is an encrypted channel - it controls the timing of credentials being taken out in different contexts. If credentials can be transmitted over a plaintext connection, isolation loses its meaning. In addition to the security tag, the document also suggests using a prefix with the hostname to name the credentials, binding them to a specific host rather than a registered domain, to avoid another subdomain in the same domain mistakenly reading it. A complete statement must appear simultaneously with four items: cross-site transmission, security tag, path restriction, and partition attribute.

Three typical manifestations that cannot be read on the embedded page

These are cases of lost login status: After the page is embedded in a partner site, all the places that require login show as not logged in, because after partitioning, the top-level one read is from the partner site, which is usually empty. The second case is inconsistent status: At the same address, it is logged in when accessed directly, but when embedded, it jumps to the login page, with different data written on both sides. The third case is error in CSRF protection and status verification: A request is made with some credentials, but the verification is done according to another context. The common point of these three behaviors is that the problem only appears in the embedded environment, and cannot be reproduced when accessed locally directly.

Two things to confirm before the transformation

This issue is whether this credential should be shared or not. The common design goal of login credentials is 'who am I on my own site', and once it is handed over to the partitioning mechanism, it is equivalent to admitting that it is a different identity in different top-level environments.AnQiCMS authentication follows JWT, the transmission of login credentials and background permission verification are judged according to the site itself, and user management and VIP grouping determine what content different user groups can read - this design inherently assumes that identity belongs to the site rather than to the embedded context.The second thing is whether the embedded page needs login status. Most display-style embeddings do not require it, and making it unreadable is the correct behavior; when it is indeed needed, the correct solution is not to cancel the partition, but to switch to carrying one-time credentials by the top-level page or using an interface to retrieve data between servers.

Scene Performance after partitioning Is it a problem Direction of processing
Direct access to the site Read the data at the top level of this site Normal No change needed
Embedded in display by other sites Read the other data at the top level of the other party, usually empty Normal Maintain read-only display without requiring login
Write operation needs to be performed on the embedded page Verification is performed according to another context, which is prone to failure Is Change to jump back to the site to complete
Hope to share the same data across contexts The partition mechanism is inherently impossible Is Replace data with server-side interface, do not open the partition

Common questions

Q: If we remove the partition attribute, can the embedded page read the login state? A: Technically it can, but the cost is to give up this isolation, allowing the same credentials to be taken across top-level contexts, which is contrary to the purpose of tightening browser tracking.

What is the relationship between partition and cross-site tag? Answer: Two things. The cross-site tag determines whether this data can be sent in cross-site requests, and the partition determines which storage copy is read when sending.

Why is it recommended to use a prefix with the hostname? Answer: To bind the credentials to a specific host rather than a registrable domain, to avoid other hosts in the same domain from reading it.

Related articles

In the front-end monitoring, the loading time of cross-domain images is all zero, which response header should be added

The loading time of cross-domain images is read as zero in the front-end monitoring, the missing is the timing pass response header. The official document defines: this header specifies which sources are allowed to see the attribute values obtained through the resource timing interface, otherwise these values will be reported as zero due to cross-domain restrictions. The value can be a wildcard to release all sources, or a comma-separated list of sources. It only affects timing readings and does not change the access permissions of the resources, so adding this header solves the attribution problem, not the access problem.

2026-10-12

The intermediate response code for pre-loading resources on the first screen, why is it only issued in multi-path multiplexing protocols in most cases?

The 103 intermediate response used for pre-loading resources on the first screen is a prompt issued by the server before it organizes the final page, allowing the client to pre-connect or pre-load resources. The official documentation suggests that for compatibility and security reasons, it should only be sent in HTTP protocol version 2 or higher, as most browsers only support it under these conditions. The reason is that under old protocols, the boundary handling between intermediate responses and final responses is inconsistent, which is easy to confuse with the content of waiting responses.

2026-10-12

How to check the status code conditions and inheritance level when the security response header is added but not present in some responses?

The security response header is added but not visible in some responses, usually stuck at two places: first, the header addition instruction only takes effect for specific response codes, the effective codes listed in the mainstream Web server documentation include two hundred successful segments and three hundred redirects, non-successful responses need to be added unconditionally with the always parameter; second, the hierarchical inheritance rule - once the header addition instruction is defined at the same level, the entire set of definitions at the upper level no longer inherits. The troubleshooting sequence is to first reproduce the response code missing the header, and then locate which level of configuration generates it.

2026-10-12

After splitting search and training into two switches, the access rules should be judged according to which purpose

On September 15, 2026, an edge platform announcement divided search, AI training, and AI agents into three independent controls, so the site does not have to choose between retaining search and blocking training. The announcement also provided two ratios: the mixed-purpose crawler accounted for 36.6% of the verified crawling traffic, less than 1% of the site side would block search crawlers, and about 17% restricted AI training. After the switches are opened, the access rules should be judged according to the purpose of access, not according to the source domain.

2026-10-12

Why does the program overwrite the entire site configuration file when saving settings, and why does it overwrite the rules I added myself?

When saving settings, the program overwrites the directory-level configuration file, taking away the manually added rules along with it, because these files are only one copy, generated in full by the program according to its own template. The same program PbootCMS has fixed this issue in the update record of V3.2.26: When Apache turns on pseudo-static, it misjudges the environment, causing the configuration file under the site directory to be overwritten every time it is saved. The approach is to separate the rules managed by the program from the rules added by operations and maintain them in two places, backup before modification, and compare item by item after modification.

2026-10-12

The explicit specification of an index in a list query is actually slower, in what situations will it degrade to a full table scan?

Writing a fixed index hint in a list query is equivalent to letting the optimizer give up the opportunity to choose a path based on statistical information: when the hint points to an index that does not match the current conditions, the query that could have used a covering index or range scan will be pushed to a more costly execution method, and further degraded into a full table scan when the conditions fail. The same program PbootCMS has fixed the issue of list tags degrading to a full table scan due to index hints in the update records of V3.2.26, and has unified the new libraries to be indexed by the title field.

2026-10-12

Why should the database script in the online upgrade be arranged in version order, and what should be done if it fails halfway

The database script for the online upgrade must be executed strictly in the order of version numbers, as each script is based on the premise that 'the previous one has been completed': the new field has not been created, and the next one will fail when writing values. Skipping intermediate versions during cross-version upgrade will leave the table structure halfway. If the script fails halfway, the safe approach is to stop immediately and leave a log, rather than ignoring the error and continuing to run the remaining scripts, otherwise the problem will be covered by the subsequent scripts. Make a backup of data and static files before the upgrade, and check each section after the upgrade.

2026-10-12

Why would the entry be lost and keep getting bigger when writing the intercept list to a file?

Write the login intercept list to a single file, and it is easy to lose entries under concurrent writing: two requests read the same content at the same time, append it separately, and write it back, the one written later covers the previous one, and the addresses blocked are thus removed from the list. A file without a capacity limit will continue to grow, and the time for reading and parsing will also increase; irregular malformed entries will cause parsing errors directly, leading to the overall failure of the list. The list is just a layer, and the server still needs to have independent verification and captcha links.

2026-10-12