Skip to content

Browser Caching wont auto clear, the *.md file is still oldest until refresh page by hand #1791

Closed
@fankes

Description

@fankes

Bug Report

Steps to reproduce

Whether debugging locally or publishing to a github page *.md documents automatically generated md files are always cached and need to be manually refreshed on each page to get the latest *.md documents.

I tried the following method but it still doesn't work

 window.$docsify = {
        requestHeaders: {
            'Cache': 'no-cache',
            'Cache-Control': 'no-cache, must-revalidate',
            'Pragma': 'no-cache',
            'Expires': '0',
            'If-Modified-Since': 'Thu, 01 Jun 1970 00:00:00 GMT'
        }
}

Two issues with the same problem: #1119 #937

↑ Tried the solution but still doesn't work.

What is current behaviour

The document does not automatically refresh when the page is closed and reopened, requiring the user to manually refresh (this will cause confusion for users reading the document with old versions)

What is the expected behaviour

Get the latest version of *.md files in real time

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: MacOS 12.3.1

  • Node.js version: 12.16.2

  • npm/yarn version: 6.14.4

  • Browser version: Chrome

  • Docsify version: 4.12.2

  • Docsify plugins: I think there is no plugins called this bug

Please create a reproducible sandbox

sandbox can't reproduce this problem, only in browser.

Mention the docsify version in which this bug was not present (if any)

Not found yet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions