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
1
vote
1 answer

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 question is, how can I add the X-Requested-With request…
Jeff
  • 1,406
  • 3
  • 26
  • 46
1
vote
0 answers

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 6 and 9). And this is for just one user. But the…
John
  • 39
  • 3
0
votes
1 answer

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 hosted at AWS. Both services use the same Elastic…
0
votes
2 answers

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 subdomain (https://api.mysite.com) And there are some…
Rüzgar
  • 101
  • 3
0
votes
0 answers

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 the proper way to setup nginx to be able to tell if…
astropanic
  • 297
  • 2
  • 5
  • 18
0
votes
1 answer

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 such as authenticating password etc, I can not use…
TheOne745665
  • 101
  • 1
0
votes
2 answers

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 upstream server. It is a commercial product that…
0
votes
1 answer

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 login page. I tried adding the header…
Arpit Gupta
  • 1
  • 1
  • 3
0
votes
0 answers

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 but as soon as it has to go through an apache2…
alekl
  • 1
  • 1
0
votes
1 answer

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' header error. Running the same front-end that does the…
0
votes
1 answer

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 some really odd behavior: my click-tracking…
Adam Tuttle
  • 213
  • 3
  • 14
0
votes
1 answer

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 misconfigured, but now the live scoring page ajax…
Rooster
  • 485
  • 2
  • 7
  • 21
0
votes
1 answer

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 which send POST arguments to the controller, as the…
Emidee
  • 131
  • 7
0
votes
2 answers

Polling performance on shared host

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 each player would be polling the server for the…
Shlomo
  • 103
  • 4
0
votes
1 answer

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. They are gone in Firebug and the site is displayed…
Jmichelsen
  • 113
  • 6