Open Bug 1816422 Opened 3 years ago Updated 11 months ago

"disable javascript" should apply correctly to pages in BF cache

Categories

(DevTools :: Debugger, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

Details

When the "disable javascript" feature is enabled it might have unexpected effects on pages in BFcache.

One example:

  • load page A with JS enabled (default)
  • navigate to page B so that page A goes into BFCache
  • disable javascript (page B is reloaded)
  • navigate back to page A

page A is then taken from BFCache and therefore might already have had scripts loaded.

See discussion over at https://phabricator.services.mozilla.com/D169182#5566853

Question was:

there are still other issues with this feature:

  • [...]
  • similarly all pages which have been put in bfcache will retain the javascript disabled/enabled setting

Pointers from :smaug

I guess https://searchfox.org/mozilla-central/rev/e7dd9d9ba128478e1ff399778e851365ced3c806/docshell/base/CanonicalBrowsingContext.cpp#290 could copy the flag to the new browsing context.

Another idea was to invalidate all the pages currently loaded in bfcache when enabling /disabling this feature. Or finally we could also show something to the user when the displayed page is in an "unexpected" state and might need to be reloaded.

Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.