Questions tagged [ajax]
AJAX (Asynchronous JavaScript and XML) is a set of development techniques for creating interactive web applications, using asynchronous communication between the client and server.
64 questions
0 votes
1 answer
137 views
Prestashop issue after moving to another server - 302 Found sometimes with ajax
I'm working on a Prestashop web shop and it's live for a few years. Now we want to move it to another, better, VPS server. Server is configured and prepared before, then the files copied, and database ...
0 votes
1 answer
2k views
Getting CORS error while accessing audio files on same server in chrome
Access to video at '/path/to/mp3/file' from origin 'https://example.com' has been blocked by CORS policy: Request had a target IP address space of unknown yet the resource is in address space public.
0 votes
1 answer
3k views
Unable to connect SQL Server from PHP using Windows Authentication
I'm trying to connect to MS-SQL Server from PHP-8.0 (hosting on IIS-10 localhost) using SQL Server Driver for PHP, i.e., SQLSRV-5.9. While connecting from a PHP page, if I use SQL Server ...
1 vote
1 answer
1k views
Is it possible to detect an ajax request with Apache 2.4 for a mod_rewrite rule?
Is it possible? Trying to move my script security to the server-level. With PHP, just check if $_SERVER['HTTP_X_REQUESTED_WITH'] is set to XMLHttpRequest (jQuery added). I guess maybe a better ...
0 votes
2 answers
32k views
PHP unable to identify sqlsrv_connect() function while trying to connect SQL Server
I'm trying to connect to my local MSSQL Server from a simple PHP file using the sqlsrv_connect() function, but every time I'm calling the file in the browser through localhost, it's throwing a 500 (...
1 vote
1 answer
2k views
Nginx POST request is changed to GET when using Ajax
I have an Nginx server used for a store. That store has an API which is in a different folder for which i'm using an alias. Here is my example.com from sites-enabled in Nginx: server { listen 443 ...
2 votes
1 answer
2k views
Why must the XHR status be set before echoes in PHP?
Perhaps this question belongs on Stack Overflow or another site instead, in which case please tell me and don't just downvote; I will gladly move it. Anyway, I'm just learning the very basics of ...
1 vote
0 answers
416 views
Good system for Ajax to send keepalives every N seconds to PHP without overloading server
I have a website in which Javascript sends HTTP POST Ajax requests every 5 seconds to a PHP script on a CentOS server. If I check netstat, I see lots of connections in TIME_WAIT state (mostly between ...
0 votes
1 answer
574 views
POST requests from mobile network (hotspot or not) always fail
I have noticed a weird behavior regarding POST requests on all my servers from devices that are connected to the internet either via 4G or via hotspot from a 4G network. I am an admin of 2 services ...
1 vote
0 answers
2k views
ajax/jquery causes "error 500" on Apache2 (php-fpm enabled) server
Just set a VPS with this guide: "https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/". Everything looked perfect! but I ...
3 votes
3 answers
2k views
Redirecting from https to http?
Strange problem here. I use FullCalendar to initiate an ajax request to an endpoint on my server. Endpoint is: https://my_website/events/?start=2019-03-31&end=2019-05-12&_=1555698739056 ...
0 votes
2 answers
2k views
Using deny from all inside htaccess in a subdomain restrict access to itself
I am facing a strange situation where i couldn't find a proper answer to. I am using some kind of an API where i can send responses to certain requests from the same root domain. My api is in a ...
1 vote
1 answer
854 views
NGINX - differentiate between plain HTTP and AJAX requests
Is there a way to differentiate between plain HTTP(s) and AJAX requests? My idea was to log the X-Requested-Withheader in the nginx logs, but it seems it's not set by each AJAX client. So what is ...
2 votes
1 answer
9k views
Ajax "POST" not working on HTTPS/SSL Nginx
I moved my magento store from non SSL to SSL (webserver: Nginx) The problem : The site's JS scripts ( Multiple Ajax function with "POST" ) has stopped working! Requests are fine but not able to get ...
0 votes
1 answer
680 views
Execute bash script via PHP
I need to execute a bash script via a front end Ajax/PHP Site. I have looked into SSH2 and for the life of me can not get it installed. Now, I know you can use shell_exec but this throws up problems ...
0 votes
2 answers
2k views
Nginx reverse proxy to identical ajax applications, choose which one with url
I need to have a reverse proxy that is capable of forwarding requests to upstream applications that have identical architecture, but are not Identical. I have no control over the code running on the ...
0 votes
1 answer
4k views
Access-Control-Allow-Origin does not match.. but it does
Nginx CORS error is not going away. I am using Debian Jessie and below is the and sites-available/reverse.conf Reverse.conf is the file i created for reverse proxy. I am getting this CORS error on ...
0 votes
0 answers
643 views
How to reduce extremely long delays when sending ajax requests through apache2 reverse proxy?
I'm developing a web application in which the forms send ajax call to the server to save the data. When running it locally or talking directly to the server the whole request take less than a second ...
1 vote
0 answers
173 views
High percentage of ajax errors
My company's website uses jQuery ajax to submit forms. A high percentage (5% - 10%) are failing, causing the ajax's error handler to run in the client's browser. The error handler looks like this: $....
0 votes
1 answer
845 views
Why does my nginx proxy fail, but my node.js proxy works?
I am trying to setup an nginx server to reverse proxy data from two different servers via ajax. Only one of the requests is working however. The other gives me a No 'Access-Control-Allow-Origin' ...
1 vote
0 answers
391 views
htaccess require host domain not working correctly
I have a folder full of folders with json files. I want to restrict AJAX requests to these files to certain domains. I made an htaccess file to restrict this but it isn't work. My htaccess is as ...
5 votes
2 answers
8k views
Disable HTTP Authentication for OPTIONS requests in Tomcat
I have an API protected by HTTP Basic Authentication. When I want to make AJAX requests against the API, the browser send an OPTIONS request which doesn't carry the Authorization header so it gets ...
4 votes
1 answer
11k views
nginx: An existing connection was forcibly closed by the remote host
I am running nginx on Windows Server 2008 R2 and it seems to be crashing, it also uses php-cgi with it and the php-cgi is part of the problem. After about 30 seconds of being on the page php-cgi ...
3 votes
1 answer
2k views
NGINX / PHP-FPM: Ajax slow first request, good next ones
The CMS is Elxis, which comes from a variant of Joomla (PHP). The server is running nGinx with PHP-FPM All requests get logged and executed, eventually, B U T!!! When firing a specific request via ...
2 votes
2 answers
3k views
Is there a way to cache only GET Ajax request?
Usually I have in nginx config rules which does not allow cache all XMLHttpRequest: map $http_x_requested_with $nocache_01 { default 0; XMLHttpRequest 1; } Is there a way to cache ...
2 votes
1 answer
7k views
POST requests from jQuery to PHP stuck if POST data exceeds several hundred characters
I have a plain ajax request being initiated by jQuery to a PHP script: $.ajax({ url:"script.php", data: data, type: "POST" // error & success handlers here }); If the data (could be JSON, ...
2 votes
0 answers
344 views
Apache2 HTMLURLMap messes with AJAX requests
I need to proxy a web application from oldname.my.net to newname.my.net For that I use apache with the proxy module like this # PROXY TO INTERNAL SERVER ProxyPreserveHost On RequestHeader ...
1 vote
1 answer
2k views
Apache log - file does not exist
I have quite a few of these in Apache logs piling up every day: [Mon Jun 09 20:42:58 2014] [error] [client 180.153.214.181] File does not exist: /home/user/public_html/ajax.googleapis.com, referer: ...
7 votes
0 answers
3k views
Nginx returning 408 error with XHR2 file uploads during mid-upload
A customer of mine is trying to upload a file to our remote nginx webserver via a form POST using XHR2 form data (and a cross-domain request with CORS). During mid-upload, the webserver returns a 408 ...
2 votes
0 answers
55 views
Strange faulty 16000d response timing in gdevtools for specific XHR
We have some XHR on our website, that is reported in Google developer tools' network timeline as Receiving for 16035.5 days. There actually is a response, and for sure it does not take as long as ...
-1 votes
1 answer
563 views
Certain URLs (and some content) not being blocked by DansGuardian
In attempting to configure DansGuardian I've had difficulty blocking certain search sites, though it also differs between browsers. I'm using the word "twerk" for testing as there's no instance of it ...
1 vote
0 answers
423 views
TMG Extending the timeout on AJAX requests
We have a web app that is designed as a single page application (SPA) that uses AJAX. Our clients have a problem when this is hosted behind TMG. Because only one page request is made at the start of ...
0 votes
1 answer
2k views
IIS aborting REST API CORS requests with status 500… for only one URI
I originally asked this on Stack Overflow, but it occurred to me this morning that it may be a question better suited for Server Fault... I'm using AJAX to make CORS requests to an api, but seeing ...
1 vote
0 answers
2k views
IE 10 HTTP 401 Error on AJAX POST
I've been chasing down an issue and decided to make the most basic reproduction of the issue possible in hopes that a simplified question will help me resolve this. I am receiving a 401 error when ...
0 votes
1 answer
2k views
Would a self signed ssl cert significantly slow down ajax requests?
I have a site with a live scoring page that updates via ajax while games are going on. It was working fine when the site was running on http. We installed an ssl an its either self signed or ...
0 votes
1 answer
2k views
NGinx rewrite rules and post parameters
I have a website, using CodeIgniter, and running under NGinx. I used these rewrite rules to cleanup the URL, and remove the index.php from the URL. Unfortunately, I have a problem with AJAX queries ...
4 votes
0 answers
4k views
NGINX proxy ajax request
I don't see what the problem is with this NGINX server configuration. I'm running a tomcat server on port 8081, jboss on 8080, and have NGINX listening on port 80. I'm sending an ajax request to port ...
0 votes
2 answers
191 views
Polling performance on shared host [closed]
I am planning on writing a small browser game. The webserver is a shared server, with no root / install possible. I want to use AJAX for client/server communication. There will be 12 players. So ...
1 vote
1 answer
251 views
Do I run an install or something for Ajax on windows 2008 R2 hosting web application?
I have an application that runs fine on windows 2003 environment with Ajax panels, checking to see if when I move this application to a new windows 2008 server R2, would I need to install the Ajax ...
-1 votes
1 answer
298 views
Get external page title [closed]
I have a task. One input: input type='text' id='url' name='url' One button: button id='go' and one div. User writes a site in that input and onclick i must show title of that site How can i ...
1 vote
0 answers
1k views
How to prevent htaccess from prompting authentication for indirect access to a file via ajax?
First off my terminology is probably wrong but when I hear "direct access" I think someone means that anyone has read privileges to a file from the url. Is my understanding of what "direct access" ...
0 votes
1 answer
598 views
Memcached and Django - When Ajax action is performed, ALL css and js is missing
I've got Django running and caching into Memcached. I have some ajax actions on a page and when those actions are performed, and the browser refreshd, the CSS and JS files are no where to be found. ...
1 vote
1 answer
8k views
CentOS: AJAX/jQuery not working
In a nutshell, I have an unmanaged VPS. At one time, it had Ubuntu 10.10 server on it, then I reinstalled it with CentOS 6 and updated it to CentOS 6.2. Now, the problem is, the AJAX/jQuery shoutbox ...
0 votes
3 answers
223 views
I want to host an AJAX based website on an Apache web server and host a MySql database on the same machine for about 50 concurrent users [closed]
The website gets its data from the MySql database. Will a Mac Mini with 2GB Ram and an Intel Core 2 Duo do the trick?
0 votes
1 answer
2k views
IE Ajax Request times out even though server is responding
This is a repost of the following SO question because I'm pretty convinced that this is a networking/server issue, and not something wrong with my code. https://stackoverflow.com/questions/7842530/ie-...
0 votes
1 answer
1k views
Getting ajaxterm to work on Debian Lenny
I've been knocking my head out for a while on this one and have read many tutorials, but I just can't get this to work. Ajaxterm, is a webbased SSH client; once installed apt-get install ajaxterm and ...
3 votes
1 answer
4k views
CNAME to get around same-origin policy?
I'm embedding an application via iframe into a someones site and need to be able to call a few of their javascript functions. Clearly running a top.cart.add() gets blocked by the same-origin policy. ...
0 votes
1 answer
1k views
.htaccess to match paramaterized URLS
I am trying to set a cache control header when a browser requsets the following url: www.example.com/php/getData.php?exampleField=exampleValue As even though getData.php is a dynamic page, when the ...
2 votes
2 answers
1k views
TIME_WAIT Info (reduce)
I have a ajax application that makes a request every 3 seconds, the requested page sets the header to (header("Connection: Keep-Alive, close");) then performs a database query and returns the latest ...
0 votes
2 answers
758 views
Block access to every file in the site but index.htm in Nginx
I have a site with just one file: index.htm which have some ajax linked to php files. I'd like to make those php files only accessible via ajax (post and get) coming from this index file and block ...