In my project I'm sending GET request to the server and what I found my every request is displaying in the xmlhttprequest log (attached screenshot) and when you open this with the browser it will show all the data. I'm going to create an API key method for my rest API, While it also takes time, for now, I want to hide logs from the console. So my question is how to hide such types of the log from my chrome console.
From my point of view it is not possible to hide any request your are sending with ajax, and another thing is that it is not compulsory to use chrome browser to use, user can use different browser, showing console log is like this is in-build functionality, normal user will not see console log. if your are worried about developers there are many plugin(like firebug) which they can use to monitor your request/response flow. so if you find any way to hide them it's not 100% solution.
my advice would be you use server side method to call your API if possible.
or second thing you can do is call console.clear(); function after calling ajax function(possible after success/fail).
you can hide such messages in Chrome in Console > Settings
(F12 > F1)
Tick [x] Hide network messages
Untick [] Log XMLHttpRequests
You can change it in the Console Settings > Hide Network
Hide Network on Console Settings
Related
I am trying to debug a webpage with chrome developer tools and the page redirects to a pdf file after it loads. I checked JavaScript files and there is not any place that we redirect the page. I cannot find any related message in developer tool console or network tab.
I activated event Listener Breakpoints -> beforeunload but it stops at an external js file (Placeholders.js) which is not related to redirecting.
Also, preserving Logs in network tab does not help me on finding root cause of redirect.
I am wondering how can I find the source of this redirect?
UPDATE: There is not any "refresh" meta tag in the html code.
There are a couple of things you can do. You can use the Event Listener Breakpoint -> Load - unload and then when it breaks in the 3rd party library, right click and select Blackbox Script. The next time you play through the code, it should only break in your own code (assuming there are no other 3rd party libraries to blackbox).
Another option is to go to the Network tab and check the Preserve Log checkbox. This will persist all requests between page loads/navigation, so that you will be able to find the network request that returned the PDF response.
.
In Chrome's developer tools, under the "Network" tab, I can see redirect paths and HTTP status code if I check "Preserve log". See image above, where you can see the domain ap.no redirect to
www.aftenposten.no and returning a status code 301.
My problem is that it doesn't work for all sites. Are there situations where Chrome will not be able to know that a redirect has happened?
One example is amazon.com, which redirects to www.amazon.com, but I cannot see the redirect in Chrome's developer tools.
Is there another way to see the redirect info in these cases where Chrome doesn't seem to pick it up?
Try these methods to get around the issue (in order of complexity):
Use an incognito window when you load the page.
Use the extension "Cache Killer" to disable caching of data.
If all else fails, clear all browsing data from Chrome.
In this instance, only clearing browsing data helped, but I regularly use Cache Killer and incognito window when I am testing my own websites.
Is it currently possible to view the body of the message being sent by a COMET event using Chrome Developer tools? I'm simply looking at COMET Clock sample here by Play Framework - http://www.playframework.com/documentation/2.2.x/Samples. When I enable the developer tools and go to the event-stream object, I can only see the request and response headers. No body or message can be viewed anywhere. Is this currently even possible? Nothing shows up under WebSockets, but I'm fairly sure this example is not using WebSockets, so that makes sense.
No. It is not possible for HTTP streaming (which I think it is your case) as March 2014 (hopefully they change this in the future)
Google Devtools only shows the response when the connection is closed.
In the case of web-sockets you do see live data.
But! modern versions of Firebug can show live data streaming. So I recommend you get Firefox and install the Firebug addon.
((Ahh firebug, it used to be all we had. Poor forgotten guy. But it still has nice things Chrome lacks!))
Cheers.
You can inspect the response from any HTTP request using the DevTools Network tab. To make finding your Comet request easier, select the XHR filter button at the bottom of the Network tab panel. You may need to reload the page after opening the Network tab to refresh the list of requests. Sometime it is necessary to switch back and forth between the All and XHR filters to see new requests that have been initiated since selecting the XHR filter. Once you have identified the request item, click to select it. On the right panel choose
Response from the taps at the top
There is a link in a spring-webflow2 based application which start different flows. Flows are shown in popup (popup=true). If the session is expired or server is unavailable, the spring-webflow shows small empty popup with "Ajax Request Error" tooltip shown on mouse over. Is it possible to tweak the popup in order to give the user an ability to either re-login or to just close the popup and retry the request?
EDIT: Or maybe some ideas how to force Spring-Dojo to make a redirect to login page?
The problem is that the session is gone and so is the conversation/flow in it. So there's no easy way to make the popup work again, because the conversation or flow state must be restored. I think the best you could achieve would be to somehow convince Dojo to redirect back to the login url.
I'm writing a ajax chatting webapp, just to test working with GWT.
To simulate server side push of chat messages from the server to the browser, I have a XHR request running behind. It all works fine - except on Chrome, the browser is displaying a loading icon (a spinner) because of the XHR request on background.
Is there any way to avoid this? I've tested it in Firefox, and it doesn't display such behavior.
EDIT - I found the solution. http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a0330cb47e05c485?fwc=2
quoting the GWT groiup post:
Chrome shows the loading indicator if connection was made immediately
from the "body onload()", i.e. from onModuleLoad().
Chrome shows the loading indicator if connection was made immediately from the "body onload()", i.e. from onModuleLoad().
No, there is now way to disable this.
All AJAX requests cause Chrome to display this. I'm guessing it's for security reasons. (The user is aware of any AJAX requests that he/she might not be aware of.) Also, it indicates that data is being fetched - a type of status indicator.