docsify icon indicating copy to clipboard operation
docsify copied to clipboard

Disable caching to get latest .md file

Open bilencekic opened this issue 6 years ago • 3 comments

Bug Report

Steps to reproduce

Update an .md file and refresh the browser

What is current behaviour

.md file is read from the cache directly. As per network tab, it is retrieved from cache. On my local it works fine but in server always read from cache.

What is the expected behaviour

It should always read the latest .md file content in the server.

Other relevant information

maybe it is due to below code ? How to disable it ? image

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

  • Your OS: Mac OS Catalina

  • Node.js version:

  • npm/yarn version:

  • Browser version: Chrome Version 80.0.3987.163 (Official Build) (64-bit)

  • Docsify version: latest (4.11.3)

  • Docsify plugins: Search, mermaid,emoji

Please create a reproducible sandbox

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

bilencekic avatar Apr 14 '20 09:04 bilencekic

sorry my bad after adding below code, issue has been fixed;


  requestHeaders: {
    'cache-control': 'max-age=0',
  },

bilencekic avatar Apr 14 '20 14:04 bilencekic

Does this mean I have to modify the source code to get this feature?

shirleyman avatar Dec 15 '20 21:12 shirleyman

@shirleyman you need update index.html, https://docsify.js.org/#/configuration?id=requestheaders

sy-records avatar Dec 16 '20 00:12 sy-records