I tested on firefox mobile and chrome mobile browser. Perfectly working on computer browsers
Here is my code inside ready() and load() event method:
$(document).ready(function(){
$(window).on('load hashchange', function(event) {
alert();
});
});
Why alert() is not working after page completed loading.
And here is my another code:
$(function({
$.ajaxSetup({
headers : {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
});
$(window).on('load hashchange', function(event) {
$.ajax({
//ajax request faild due to csrf token mismatch
});
});
I didn't found any X-CSRF-TOKEN request header on chrome devtools.
According to the w3schools 'The ready() method should not be used together with <body onload="">'. But I'm not using any html inline load event. Please help me to find out this issue.
I'm using jquery v3.6.0 on my project. Also I used usb remote debugging for check request headers. Thanks in advance