Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages cached by the browser in non-proxied windows remain cached when loaded in the AUT #28681

Closed
cacieprins opened this issue Jan 10, 2024 · 2 comments
Labels
stale no activity on this issue for a long period type: bug

Comments

@cacieprins
Copy link
Contributor

cacieprins commented Jan 10, 2024

Current behavior

When an HTML document is loaded in a secondary browser window with, e.g., a link with target="blank", that page does not receive the cross-origin support injection from the proxy. Depending on the caching strategy in place, when loading this URL in the AUT, the browser will serve the cached version of the document. If cross origin support is necessary for the driver to communicate with the AUT, the test will hang while waiting for the cross origin postMessage handshake.

Desired behavior

These documents should cause a cache miss, instead of a cache hit.

  • The proxy should recalculate etag headers when it injects code into AUT-rendered documents, and keep track of etag recalculations on given URLs for ensuring appropriate 304 responses on future requests. This will resolve the issue when etag cache control is in place.
  • A manual workaround to manually clear browser cache for other cache control strategies

Test code to reproduce

This spec reliably reproduces this bug in Electron open mode:
https://github.com/cypress-io/cypress/blob/develop/packages/driver/cypress/e2e/issues/1244.cy.js

Cypress Version

13.6.2

Node Version

18.15.0

Operating System

MacOS Sonoma 14.1.1

@cacieprins cacieprins changed the title Flaky test: Flaky test: issue 1244 nested iframe does not strip link _parent Jan 10, 2024
@cacieprins cacieprins changed the title Flaky test: issue 1244 nested iframe does not strip link _parent Pages cached by the browser in non-proxied windows remain cached when loaded in the AUT Jan 11, 2024
@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Jul 10, 2024
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period type: bug
Projects
None yet
Development

No branches or pull requests

2 participants