AJAX (Asynchronous Javascript And XML) is a popular technique for creating interactive websites.

learn more… | top users | synonyms

-4
votes
0answers
20 views

Should contentType be in my ajax? If yes how to fix it [on hold]

I been trying to figure this one out but i don't seem to find the error but in my script My script $('#Bshift').click(function(){ var isValid=false; isValid = validateForm(); if(isValid) { var ...
0
votes
0answers
15 views

Using Simile widget timeplot to overlay events on discrete data [migrated]

I was given the task of finding a way to graph my company's manufacturing data from each batch of material (specifically density) with an overlay of process changes in some sort of timeline format. It ...
2
votes
1answer
77 views

Testing async code: are long sleeps acceptable?

I am testing some AngularJS code using Selenium. Angular updates the DOM in unpredictable order, sometimes completely async (via setTimeout), so it is difficult to know when the DOM has been ...
1
vote
2answers
59 views

Many AJAX requests to check domain availabilities [closed]

I've recently developed a website that randomly generates unique names, then checks for their .com availability. In order to do this, I call 3 AJAX requests to a php page where it randomly generates ...
0
votes
1answer
78 views

Handle multiple data writings per second

I am planning a website with an html/javascript frontend input and a php backend. The user has to input data which will be saved in a database. Now I want to inform the other users of my site ...
2
votes
2answers
101 views

Why use a unique hashkey for form submissions?

I have multiple forms and use AJAX to submit them. I asked my boss if he needed any specific format for the form ID and he told me to generate a unique hash and keep it in session; check it whenever ...
2
votes
5answers
481 views

Securing ajax calls to rest api

I need for my app to consume a rest api service and since I will call it from javascript/jquery i need to expose it to the end user. In this case I would also need to expose credentials to the end ...
4
votes
1answer
105 views

Risks of AJAX calls to ASMX

Currently working on an ajax call to an ASP web service (.asmx). In a situation where I POST to the url/.asmx/WebMethod, am I exposing information of any kind? In the 'WebMethod' I am running a ...
1
vote
0answers
94 views

How do I handle authentication in an ASP.NET webapp with offline-capable client code?

I hesitated before writing this question, as it sounds like I'm after an opinion without trying anything yet. That's not the case, I just don't want to go down the wrong route with architecture - it ...
0
votes
2answers
83 views

How to protect controller endpoint from abuse?

I am building a web app that will first validate a promotion code via AJAX call and then if it is valid, allow the user to fill out the rest of the form, I use KnockoutJS to reveal and hide the ...
3
votes
1answer
160 views

Partial Model Updates From View

I hope this is on-topic here since I'm a bit new to the whiteboard... I'm currently developing an application using ASP.NET MVC 5 (and WebAPI 2). One of my domain entities is huge, and is stored in ...
0
votes
1answer
126 views

Calling RESTful service from browser and handling 4xx class responses

I have a resource called Logins, and I invoke a GET via AJAX from the browser. The current behavior is to return a 404 when the specific login cannot be found. I'm using this to check whether a ...
1
vote
1answer
93 views

is there a cleaner / simpler way to code this? [duplicate]

I have a web app that uses ajax to filter db results. So if you have a list of 1000 widgets, that have IDs ranging from 1-1000, by typing numbers into the ID field, you can narrow your search. ...
1
vote
1answer
111 views

How does StackExchange load data from the server without making an XHR request?

When viewing the questions for a tag on SE networks, every now and then you will get a message at the top: n questions with new activity. However the weird thing (to me) is that I don't see any ...
1
vote
1answer
407 views

Asp.Net MVC from in modal bootstrap

First, some of the technologies in play: Asp.Net Mvc 5, Bootstrap 3, JQuery. On my view I want to create a bootstrap model dialog, with a simple form in it. When the user clicks submit, there are two ...
3
votes
1answer
355 views

Nested REST urls and parent id, which is better design?

Okay, we have two resources: Album and Song. Here is API: GET,POST /albums GET,POST /albums/:albumId GET,POST /albums/:albumId/songs GET,POST /albums/:albumId/songs/:songId We know that we hate ...
1
vote
0answers
164 views

Prevent Timeout for large scripts without changing any System Settings

Current Option If I have a process that I know may take a while I have been chopping it up using ajax to do a part of the request then once the ajax is returned do the next part of the request. This ...
0
votes
1answer
140 views

How to appropriately structure a script used in an AJAX call?

When I first learned AJAX, I was also teaching myself the languages of PHP, JavaScript, SQL, HTML, and CSS. I followed my coworkers existing web apps as examples of how to write my own web ...
0
votes
1answer
112 views

How to handle coding errors in my PHP AJAX code?

How do I handle coding errors in my PHP which has no GUI, only an API? I am concerned that I might never know that there are any. Note that only I will develop the client side. This is not a public ...
0
votes
2answers
286 views

Attempting to make a Cross Domain AJAX request to a Server I don't own

I'm aware that javascript programs running in a browser are bound to the same-origin policy which prevents them from requesting services from a server that is on a different domain. What I've gathered ...
1
vote
0answers
60 views

Need to add websocket support to a single page that's running a wsgi service

Current setup. I have a legacy ERP system (Thoroughbred) and i then have several in house applications (CRM, WMS) and a website that interact with it via an xml server and straight ODBC connections. ...
1
vote
1answer
225 views

Should I generate reports client or server side? [closed]

I am thinking of a standard AJAX setup (JS<->PHP<->MySql). I want to generate reports (charts, tables, etc) probably using at maximum a few dozen data points (certainly never over 1k). I am ...
2
votes
1answer
118 views

AJAX - What exactly does that encompass? [closed]

So I see on a lot of people's resumes they list AJAX in their technologies (or programming languages - and I recognize that it is not a language). To me, AJAX seems like such a small concept to be ...
-2
votes
1answer
130 views

PHP vs ROR for AJAX and responsive design [closed]

I'm in the planning phase of making a website for calculating various mathematical problems, as a school/sparetime project with a couple of friends. We're gonna start off with implementing a "right ...
2
votes
2answers
71 views

Bulk update in client-server application

Sometimes when coding a client-server application, the client needs to make a bulk update. For example: "mark all pending orders as dispatched". To implement these I typically write specific ...
1
vote
1answer
180 views

how can I minimize my ajax calls to the server while creating a dashboard

I want to create a dashboard for my website. I have divided my dashboard into different modules. As I understand it, I will have to make many AJAX calls. The different modules are: total number of ...
1
vote
2answers
366 views

How-To: a browser based, real time, shared memory inspection/debugger application [closed]

Background: I have a C application running under Linux utilizing shared memory. I also have a debugger written in Python that can link to said shared memory and access individual variable values of ...
1
vote
1answer
63 views

SPA Applications: AJAX to fetch templates or build from strings

I'm working on a large angular application and I'm currently using a factory class that builds HTML templates from strings. We don't have to worry about mobile support for the application and I'm ...
0
votes
0answers
199 views

Apache Wicket, updating data without using a form, is it safe?

I have a ListUser.java class with a datatable, displaying UserData information, displays 4 columns, the last column is an AbstractColumn that has on it's populateItm method has added a inner class ...
6
votes
3answers
511 views

Proper Response to HTTP Request When Too Much Data is Requested

I'm building an API for an ad serving platform that will allow you to request tracker data for ad campaigns. Campaigns often exceed hundreds of millions of requests, which means there will be many ...
0
votes
0answers
244 views

Best practice: dynamically handle variable data, multiple file uploads and encoding with jQuery, AJAX, PHP and MySQL

I'm currently writing an e-learing web-application. I'm sorry if this is information overkill but I think it's better to describe it in detail so you get the idea. I have made thought on every point ...
0
votes
0answers
183 views

What is the use of the prefix “for(;;);” in an Ajax response

After using the chrome debugger to inspect the ajax requests of Facebook (for curiosity), I noticed that the response is in JSON, however it is always prefixed with for(;;); In example, if the JSON ...
1
vote
3answers
196 views

Executing ajax calls in setTimeout after set intervals?

We develop an application involving a lot of ajax. Such as showing users notifications, updating what they see via ajax while they are on the web page. This update is due to the actions of other users ...
2
votes
1answer
282 views

JavaScript Compression and Caching of Assets

I'm working on an idea that i can't seem to find a good answer though hours and hours of searching, I'm planning a small Canvas/WebGL Application this application will be using WebSockets to talk to ...
0
votes
1answer
149 views

How should a REST API handle PUT when missing parameters?

I have a list of users that are being assigned to a certain office. I use checkboxes to select each user and when the client is done, a PUT is performed: PUT offices/:id users[0] : 14 users[1] : 12 ...
-1
votes
2answers
392 views

Whats the best way to build a HTML/AJAX site that requires login? [closed]

Let's say that hypothetically you wanted to build a website that delivered content to the visitors entirely using HTML and Javascript (AJAX to fetch server side data). The site would require login for ...
0
votes
1answer
267 views

Should I use session or cache to keep the time it last polled when polling to server at intervals?

I'm building a web chat app using session to keep the time the app last polled so that the server can determine whether messages exist between the current polling time and last polling time. It works ...
2
votes
0answers
85 views

Synchronizing web ui and third party async services

I'm looking for concepts, approaches or even Framework/libraries to help me synchronize state reliably from web UI to a third Party Service. For example: creating a JavaScript irc Client ui you need ...
1
vote
2answers
362 views

Web Application: Combining View Layer Between PHP and Javascript-AJAX

I'm developing web application using PHP with CodeIgniter MVC framework with a huge real time client-side functionality needs. This is my first time to build large scale of client-side app. So I ...
3
votes
1answer
464 views

Caching large amount of ajax returned objects

I'm building an application which fetches large amount of items with ajax requests via other application API. It returns me 6k - 30k js objects which are used multiple times across various application ...
0
votes
2answers
874 views

Should I ditch AJAX in client side web development when I've got a web-socket open?

I was thinking that maybe I should forget AJAX (HTTP) requests when I've got a web-socket open between client and server, but I decided I should ask here to check if this could be a bad practice for ...
6
votes
5answers
5k views

Pure Front end JavaScript with Web API versus MVC views with ajax

This was more a discussion for what peoples thoughts are these days on how to split a web application. I am used to creating an MVC application with all its views and controllers. I would normally ...
1
vote
2answers
350 views

Application use on website

Is there a good way to run a C# application on clientside in lieu of JavaScript? I have done some front end work with JavaScript and backend C# for web developing at an old job, but I am interested in ...
3
votes
3answers
330 views

how should I handle server error during ajax logout?

I need to write a handler for server error during user logout. What is a common practice? ajax.post({ url: '/auth/logout' }).done(function (response) { switch (response.statusCode) { ...
0
votes
1answer
1k views

I'm thinking to CSRF protect all public AJAX requests that return JSON, but I have some concerns

I'm thinking to CSRF protect all public AJAX requests that return JSON, because what's to prevent another site from spoofing the AJAX header and using the JSON as if it were a public API? I think CSRF ...
0
votes
1answer
96 views

What does &callback= do

I am trying to create a timer that ever x minutes it will call to a server, get a JSON file and do something with it. The merits of that system are not in question right now, the question involves ...
2
votes
1answer
92 views

How is same-origin policy implemented?

I was looking at cross-domain requests for a design and stumbled upon something that puzzles me. From a local site I'm firing an Ajax request to another domain (with jQuery and vanilla ...
0
votes
2answers
684 views

“Match Making” script, a way without involving the database and php?

I am writing a matchmaking script for a game through a web portal. For the past few days I have been looking into the different options and I believe the following approach would be the most optimal ...
1
vote
3answers
2k views

Are (mostly) client-side JavaScript web apps slower or less efficient?

I am in the midst of writing a web application for work. Everything is from scratch. I have been a PHP programmer for about 13 years, Node.js programmer for the past 2 years, and have no shortage of ...
2
votes
2answers
141 views

Security concern regarding web service

I'm currently working on a pet project with two of my buddies. This web service will provide basic functionality such as Login/Password Modification/Registration etc. All of us are comfortable with ...