避免请求缓存,在url后面拼接随机字符串
if (url.match(/\?/g)) {
url =url +'&r=' + (Math.random() *1000).toFixed(0)
} else {
url =url +'?r=' + (Math.random() *1000).toFixed(0)
}
避免请求缓存,在url后面拼接随机字符串
if (url.match(/\?/g)) {
url =url +'&r=' + (Math.random() *1000).toFixed(0)
} else {
url =url +'?r=' + (Math.random() *1000).toFixed(0)
}
本文标题:AJAX 请求优化
本文链接:https://www.haomeiwen.com/subject/pjaqvhtx.html
网友评论