You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
Context: There is a site which prevents authorized users from accessing the login page. If the authorized user tries to access the login page, that user gets redirected to the index page behind the login.
Problem: When the login page gets predicted for the authorized user, the browser pre-renders the index page. After logout, it results in showing the index page instead of the login.
This scenario depends on an actual implementation of a site. But, it is a real case and the engine should provide a way to configure such things in order to avoid prerendering of wrong pages.
The text was updated successfully, but these errors were encountered:
Also fixes: sirko-io/engine#10, sirko-io/engine#15
When a user navigates between pages, there might be POST/PUT/DELETE
requests. Those requests modify state, so a prefetched page might be
stale.
Example
GET /signin
POST /signin
GET /index
If the transition between the signin and index pages got tracked,
the index page would be prefetched when the user opens the signin page.
This behavior's been leaded to a number of issues.
To avoid the described issue, the service worker
stores all made requests on a page then the client part
asks the service worker to check whether there was a POST/PUT/DELETE
request between the referrer and the current page. If so,
the transition isn't tracked (the referrer parameter gets removed, thus,
the engine doesn't track the transition), but the engine makes a prediction
for the current page anyway. The transition is about the previous
and the current page, the prediction is about the next page.
Context: There is a site which prevents authorized users from accessing the login page. If the authorized user tries to access the login page, that user gets redirected to the index page behind the login.
Problem: When the login page gets predicted for the authorized user, the browser pre-renders the index page. After logout, it results in showing the index page instead of the login.
This scenario depends on an actual implementation of a site. But, it is a real case and the engine should provide a way to configure such things in order to avoid prerendering of wrong pages.
The text was updated successfully, but these errors were encountered: