Cache 301 redirect? 301 Moved Permanently (from disk cache)

Today, when writing a blog system, data is refreshed frequently found home does not come out, even the back end did not receive the request, that is the question of Ajax, but Ajax request by Ethereal discovery has indeed sent out, but the state code is 301 Moved Permanently (from disk cache)301 is a permanent redirect, but the latter description seems to suggest is redirected to the cache? ? ? And sure enough after the ban browser cache, no problem, this problem when loading and verification code, like, the reference code to bypass the cache way in the request parameter followed by a time stamp, successfully resolved.

let vm = new Vue({
    el: '#container',
    data: {
        pageCount: 0,
        next: "",
        previous: "",
        results: [],
        pageSize: 4,
    },
    methods: {
        getData: function () {
            let self = this;
            reqwest({
            // 加了一个 no 参数以绕过浏览器缓存
                url: 'http://127.0.0.1:8000/junblog?size='+ this.pageSize +'&page='
                + page + "&no=" + Date.parse(new Date());
                , method: 'get'
                , type: 'json'
                , success: function (data) {
                }
            })
        },
    
    mounted(){
        this.getUrl(0);
    }

});
Published 63 original articles · won praise 33 · views 10000 +

Guess you like

Origin blog.csdn.net/zjbyough/article/details/104144558
301