Home  >  Article  >  Backend Development  >  The problem of json being cached in wamp

The problem of json being cached in wamp

WBOY
WBOYOriginal
2016-07-06 13:53:471155browse

Use Ajax to request a json file from the background. After modifying the json file, request the json file again. The content of the json file has not changed. Even if you delete the json file, you can still request the json file and get the same content.

I guess json is cached.

Restart the browser (firefox) and restart wampserver, and still get the original content.

This situation happened once before, and then it was solved inexplicably.

What is this situation and how can it be solved?

Reply content:

Use Ajax to request a json file from the background. After modifying the json file, request the json file again. The content of the json file has not changed. Even if you delete the json file, you can still request the json file and get the same content.

I guess json is cached.

Restart the browser (firefox) and restart wampserver, and still get the original content.

This situation happened once before, and then it was solved inexplicably.

What is this situation and how can it be solved?

I have not encountered similar problems, but one idea is to try adding random parameters to the json url request.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn