Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

84
Views
Cannot able to see the AJAX Request Header in chrome Inspect

I'm developing a java based web application. In my application, there are some data that needs to be fetched without page reload. So, I'm using AJAX in jquery framework.

Note: I'm using tomcat web server

$(document).ready(AjaxFunction);

function AjaxFunction(){
    
    $.ajax({
        type: "GET",
        url : "/DemoApp/sampleData.txt",
        beforeSend: function(xhr){
            xhr.setRequestHeader("some-custom-header","my-name");
        },
        //headers: { 'some-custom-header': 'myname' },
        success : function(){
            console.log("Working !!!");
        },
        complete : function(){
            setTimeout(AjaxFunction, 5000);
        }
    });
}

Actually the ajax request is successful. But when I try to inspect the request header using the chrome developer tools, I cannot able to find the Request header.

Expected behaviour: Here we can see that, Request headers is available for dropArea.html

I expect the same for sampleData.txt Expected Behaviour

Actual behaviour: Here, Request headers is not available for sampleData.txt Actual Behaviour

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!