javascript - The project is opened with IE browser to modify the front-end content. The background data is modified, but the content of the front-end page remains unchanged. Use Google Chrome to test that the front-end page can be refreshed. Please solve it.
过去多啦不再A梦
过去多啦不再A梦 2017-05-27 17:40:35
0
9
895

1. Use IE browser to open the project and modify the front-end content. The background data is modified, but the content of the front-end page remains unchanged. The details are as shown in the figure below:


2. Modify parameters


3. After clicking save and refreshing the page, the content remains unchanged

4.No change


5. Use Google Chrome and the content has changed.

6. Front desk code

过去多啦不再A梦
过去多啦不再A梦

reply all (9)
phpcn_u1582

Cache? Clear the cache.

    我想大声告诉你

    Mostly it is caused by cache. Does the interface you use to query this information use random parameters to ensure that it is not using cached data?

      淡淡烟草味

      I have encountered this problem before. At that time, it occasionally appeared under Safari, but it was always offline under IE. Chrome is normal
      This is because Safari and IE will cache when making a get request, causing the last cached result to be called after modification.

      The solution is to set cache: false in the ajax request and not cache

      Can also be set globally
      //Do not cache
      $.ajaxSetup({ cache: false });

        phpcn_u1582

        Looking at the address of the questioner,rand=Math.random()has been added, so there should be no caching problem in this part.

        But the problem is that the only link in the code...updateseems to be related to data, but is the update behavior from the server to the client (retrieval), or from the client to the server (save)? Judging from the commonly used scenarios of update itself, this should be taken. But judging from the large form behavior, it should be saved...

        Let’s not talk about this yet. From the description of the subject, there are actually two processes, one is depositing and the other is taking. Usually the problem will occur when retrieving, so everyone guesses that it is caused by cache... But it usually does not mean it is certain, so you should do a troubleshooting

        1. Save in IE, retrieve in Chrome

        2. Save in Chrome, retrieve in IE

        We already know that Chrome is normal, so we can figure it out whether IE is abnormal when saving, abnormal when retrieving, or neither...

        What to do next...I don’t know what to do with pure front-end. If the caching problem is eliminated, the rest is to work with the server to find the problem...

          phpcn_u1582

          Check if there is any error in your IE console

            黄舟

            I have encountered this problem before, IE will cache all request data, and add headers to non-static data request responses:Cache-Control: no-cache, no-store

              仅有的幸福

              F12 to see if there is an error. If there is no error, clear the cache

                世界只因有你

                shift+f5 to force refresh the cache, refresh it several times

                  大家讲道理

                  It should be a cache problem. IE and Edge (up to 14; I haven't tested Edge 15...) will cache the XHR content of GET by default. The solution is usually

                  • Use POST request instead of GET (not recommended...)

                  • Add random parameters such as?t=[[某个时间戳]]

                  • when requesting
                  • @Donle’sCache-Controlmethod has not been tried...

                    Latest Downloads
                    More>
                    Web Effects
                    Website Source Code
                    Website Materials
                    Front End Template
                    About us Disclaimer Sitemap
                    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!