This is a tiny extension that disables Safari’s “page cache” feature. The page cache causes problems for many Safari extensions, including some of the ones I’ve written. Installing NoPageCache will eliminate any page cache-related problems for all your installed extensions. If you have noticed problems with some of your extensions when you use the Back button—for example, certain features failing to work or contextual menu items failing to appear—NoPageCache can help.

There is, of course, a downside to disabling the page cache. The benefit of the page cache is that when you go back to a recently visited page by clicking the Back button (or using the equivalent keyboard shortcut), Safari often loads the page more or less instantaneously. Without the page cache, going back to a recently visited page is still quick, but it’s not instantaneous because Safari has to re-render the page from its HTML (although the page’s resources will usually still be cached ).

Technical note: The problems that the page cache causes for extensions are due to a Safari bug where message passing from injected scripts on page-cached pages to an extension’s global page (and vice versa) fails. The workaround is to register a handler—any handler, even an empty function—for the unload event. For some reason, this disables the page cache.

2012 Canisbos Computing
Creative Commons License