Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to prevent "Provisional headers are shown" in angularjs ajax call

I am trying to make an ajax call in angularjs application. but randomly i am getting this caution says "Provisional headers are shown" and whenever this caution comes in debugger console I am getting very slow response from server (about 30 to 45 sec). and its happening around 6 times in 10 times trial period.

this is my angularjs piece of code:-

var request = $http({
                  method:"post",
                  url:"/getdata.php",
                  data:filterpara,                              
                  headers: {'Content-Type' : 'application/x-www-form-urlencoded'}                       
            }); 

        request.success(function(data){ 

                    console.log(data);

        });

This type of piece of code I am using number of times in different controllers. but randomly same issue is coming in different controllers as well. i am unable to figure out why this is happening?

I have also tried the solutions which is already provided by these links (but no luck) :-

Node js / Angular js - CAUTION: Provisional headers are shown (this kind of problem I am facing)

"CAUTION: provisional headers are shown" in Chrome debugger

like image 790
sumitjainjr Avatar asked Mar 02 '16 06:03

sumitjainjr


People also ask

What does it mean Provisional headers are shown?

One of the most common reasons that causes "Provisional headers are shown" are Chrome extensions. The resource you're trying to load could be being blocked by an extension, usually ad-blockers such as AdBlock, uBlock Origin or Adguard.


1 Answers

Sometimes it's the AdBlock interfering, try disabling it if you have one and retry.

like image 171
CatalinBerta Avatar answered Nov 14 '22 23:11

CatalinBerta