krjojo
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
sendHitRequest: async function() {
try {
var t = this.getRequestUrl("hit")
, i = new URLSearchParams({
...WP_Statistics_Tracker_Object.hitParams,
referred: this.getReferred(),
page_uri: this.getPathAndQueryString()
}).toString();
let e = new XMLHttpRequest;
e.open("POST", t, !0),
e.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"),
e.send(i),
e.onreadystatechange = function() {
var t;
4 === e.readyState && (200 === e.status ? (t = JSON.parse(e.responseText),
this.hitRequestSuccessful = !1 !== t.status) : (this.hitRequestSuccessful = !1,
console.warn("WP Statistics: Hit request failed with status " + e.status)))
}
.bind(this)
} catch (t) {
this.hitRequestSuccessful = !1,
console.error("WP Statistics: Error sending hit request:", t)
}
},in
4 === e.readyState && (200 === e.status ? (t = JSON.parse(e.responseText),
Forum: Plugins
In reply to: [WP Fastest Cache] Cannot modify header information – headers already sentSorry, It’s my fault, I don’t know why WordPress sends out HTTP header information before entering the “add_submenu_page()” callback function, maybe
<script>window. location. href=" https://www.xxx.com/ ";</script>
is a better choice than “wp_redirect()”
- This reply was modified 8 months, 3 weeks ago by krjojo.
Viewing 2 replies - 1 through 2 (of 2 total)