Page 1 of 1
[Fixed] NoScript breaks the bfcache/fastback cache on reddit
Posted: Sat Dec 15, 2012 9:38 pm
by Whatever
Steps to reproduce:
1. Go to the comments page of any reddit post (e.g.
http://www.reddit.com/r/blog/comments/1 ... nts_posts/)
2. Fold any comment tree by clicking the [-] next to the commenter's name (note that reddit.com and redditstatic.com need to have script permissions for this to work)
3. Open any link in the same tab
4. Hit the back button
Expected result: The comments page is loaded from the bfcache, and the comment tree that was folded in step 2 remains folded.
Actual result: The comments page is reloaded completely, as can be verified by the fact that the folded comment tree is unfolded again.
This happens with both NoScript 2.6.3 and 2.6.4rc1. Disabling NoScript fixes the problem. Other than "Policy is not defined" (which I already reported in another thread), nothing is logged in the error console.
Re: NoScript breaks the bfcache/fastback cache on reddit
Posted: Sun Dec 16, 2012 10:38 pm
by Thrawn
Are there other sites being used to handle the cache, perhaps? Which sites are being allowed/blocked on the NoScript menu?
Re: NoScript breaks the bfcache/fastback cache on reddit
Posted: Sun Dec 16, 2012 10:56 pm
by Whatever
The same thing still happens when I set NoScript to allow all scripts, so it's not related to script permissions. Additionally, if I revert back to NS 2.6.2 (using the same settings), the bfcache works again.
Re: NoScript breaks the bfcache/fastback cache on reddit
Posted: Mon Dec 17, 2012 7:55 pm
by therube
How do you determine if bfcache is being used or not?
I load
The woman who lives here is almost 100 years old.
Collapse a thread.
Open
NoScript Get It is the same window.
Set browser to "offline mode".
Back arrow to reddit & the page displays as expected (except that the thread is no longer collapsed).
Re: NoScript breaks the bfcache/fastback cache on reddit
Posted: Mon Dec 17, 2012 8:06 pm
by therube
NoScript 2.6.2 preserves the state of the collapsed thread, where later versions do not, so that is different, but not sure how bfcache is playing in?
Re: NoScript breaks the bfcache/fastback cache on reddit
Posted: Mon Dec 17, 2012 9:30 pm
by Whatever
therube wrote:How do you determine if bfcache is being used or not?
therube wrote:NoScript 2.6.2 preserves the state of the collapsed thread, where later versions do not, so that is different, but not sure how bfcache is playing in?
That is how I determine if the bfcache is used or not. If it is used, the state of the DOM is saved when the page is hidden, so after hitting the back button the page will be shown again with the saved DOM state.
If you want more evidence: Run the following code in the web console on a reddit comments page and then navigate away:
Code: Select all
window.addEventListener("pagehide", function(e){console.log(e.persisted);}, false);
You'll notice that the console shows "false", which according to the
MDN docs means that the bfcache is not used. Similarily, running
Code: Select all
window.addEventListener("pageshow", function(e){console.log("showing page", e.persisted);}, false);
before navigating away and back again does not produce any output. If the bfcache was used (e.g. without NoScript or with NoScript 2.6.2), it would log a message to the console.
I hope that's enough evidence for you.
Re: NoScript breaks the bfcache/fastback cache on reddit
Posted: Mon Dec 17, 2012 9:44 pm
by Giorgio Maone
Does adding
.reddit.com to your
noscript.surrogate.popunder.exceptions about:config preference help?
Re: NoScript breaks the bfcache/fastback cache on reddit
Posted: Mon Dec 17, 2012 9:52 pm
by Whatever
Yup, that seems to fix the problem.
Re: NoScript breaks the bfcache/fastback cache on reddit
Posted: Mon Dec 17, 2012 9:52 pm
by Giorgio Maone
Whatever wrote:Yup, that seems to fix the problem.
OK, please restore the preference to its default settings and check
latest development build 2.4.6.2rc1, thanks.
Re: NoScript breaks the bfcache/fastback cache on reddit
Posted: Mon Dec 17, 2012 9:55 pm
by Whatever
Yup, it's fixed. Thanks a lot!