This repository has been archived by the owner on Jul 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix page caching and lifecycle events
Fix #551. Partial replacement broke the page cache by caching body.outerHTML (losing all DOM state in the process) instead of the body element itself. This commit brings back the old behavior, with the following gotcha: when a partial replacement is performed, we remove the current page from the cache, since the body element will not change and there is no simple way for us to bring back the changed nodes. Additionally: - page:after-remove on body elements now triggers on cache eviction (since we don't want to lose DOM state) - to avoid triggering page:load on the same body elements more than once, a partial replacement now triggers the page:partial-load event
- Loading branch information
Showing
5 changed files
with
161 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>title 3</title> | ||
<meta content="authenticity_token" name="csrf-param"> | ||
<meta content="token3" name="csrf-token"> | ||
<script src="/js/jquery.js"></script> | ||
<script src="/js/turbolinks.js"></script> | ||
</head> | ||
<body> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.