Rework new page detection and cache so framesets loaded from local files work properly