11,878 questions
Best practices
1
vote
3
replies
82
views
Are there security issues with using responseXML property of XMLHttpRequest?
I am writing JavaScript code that runs in a web browser, retrieves a user-supplied XML file, and gets certain information out of it. I know that XML parsing is a potentially dangerous operation if the ...
Advice
0
votes
2
replies
48
views
Chrome network tools override content not working
https://developer.chrome.com/docs/devtools/overrides
when the API name is followed by a number like ?_=*, the override always fails. Is any additional configuration required
overrider a api like
/...
Score of 0
1 answer
107 views
Failed to parse body as FormData on large files
I am writing a feature with sveltekit to upload google photos takeout files.
in other words large zip files containing images.
So on the browser side I have this in a function
console.log(`uploading ...
Score of 3
1 answer
114 views
Cannot send data to Node Express after converting from CJS to ESM
After having carefully converted my JS code for NodeJS from CJS to ESM (with some unexpected difficulties), I am failing to send a body content to my Node Express web server, running for test purposes ...
Score of 3
0 answers
107 views
React Native: Copy to clipboard button inside code block not working during streaming updates
I’m building a React Native app where I stream text from an API using XMLHttpRequest.
The API sends chunks of text (like a chatbot response), and I keep appending those chunks into a messages array in ...
Score of -3
1 answer
103 views
Why is the response empty when handling an XmlHttpRequestUpload load event?
I have an XmlHttpRequestUpload with a listener on the load event:
xhr.upload.addEventListener('load', () => {
if (xhr.status === 200) {
resolve(UPLOAD_OK);
}
else {
const message = ...
Score of 0
3 answers
79 views
fillTable function not always working correctly – how to make it more reliable?
I'm using a JavaScript function to fill an HTML table based on data fetched from a given URL (in JSON format). It works sometimes, but other times the table stays empty or the data doesn’t display as ...
Score of 0
1 answer
42 views
Why does XMLHttpRequest return status 0 on iphone but status 200 on web browser
I am building a web-site that calls php on the backend for some pages. When I view the html page on a computer browser, it returns with a status of 200 and shows content returned from php script. ...
Score of 1
1 answer
79 views
Interception xhr requests after pressing the load more button with puppeteer
Initially two json files arrive on the site - the rest arrive after clicking the ‘load more’ button. I'm trying to intercept all requests. The example shows how I am waiting for the button to appear ...
Score of -1
1 answer
164 views
How to receive a "stream of input" using XMLHttpRequest object?
I have a javascript file which creates a XMLHttpRequest object and opens a connection to a PHP file and sends a form object to it.
The Javascript file is like this:
let formData = new FormData();
...
Score of 0
1 answer
48 views
XHR Endpoint Returning Loading Page Data Only
I want to access the tables of the following website:
https://www.marketbeat.com/ratings/
However, pages can only be changed by setting the "Reporting Date".
I do know that I can change the ...
Score of -1
1 answer
66 views
I can`t find request URL with JSON information while web scraping
Im trying to scrape table from this website using bs4 and request libraries, but I couldnt find any relevant information in XHR or JS sections of Chrome inspect and find the json file.
I was hoping to ...
Score of -1
1 answer
89 views
Use XMLHttpRequest to replace contents of div after form submit? [closed]
I have an html form that filters a list of results in a div.
What I want is that only the contents of the div are reloaded instead of the whole page, and only using vanilla javascript.
This is what I ...
Score of 0
1 answer
565 views
How to redirect to a URL from the Location header in a 302 response using Axios?
the request returns a 302 with a URL in the Location header. The browser automatically makes a GET request to that URL, but I need to redirect the user to the page with that URL.
const res = axios.get(...
Score of 2
1 answer
2855 views
Navigator.sendBeacon vs fetch keepalive: reliability upon browser or tab close
I'm trying to make a network request when a user closes their browser or tab. If you search here on stackoverflow, you'll find one method is to use beforeunload or window.onbeforeunload. If you return ...