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

learn more… | top users | synonyms

4
votes
1answer
71 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
53 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
82 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
105 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
61 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
84 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
100 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
284 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
197 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
95 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
0answers
47 views

Result with value or error returned from service c# [duplicate]

First of all, let me explain the current situation. In a ASP.NET project, we do some ajax calls to a WCF service. This service always returns a value when called. But this is the way they implemented ...
0
votes
1answer
117 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
97 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
232 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
50 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
186 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
105 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
115 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
62 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
141 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
327 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
58 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
144 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
463 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
213 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
178 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
160 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
273 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
129 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
330 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
208 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 ...
0
votes
0answers
80 views

what is the technical term for this presentation model?

I have an application I've inherited that I'd call "proto-MVC", and I love the concept of MVC but am new to it. In my ideal dream of a lightweight application, all of the document's content is stored ...
2
votes
0answers
81 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
312 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
354 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
555 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 ...
4
votes
5answers
4k 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
338 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
284 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
94 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
82 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
623 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 ...
0
votes
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
138 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 ...
1
vote
2answers
535 views

Avoid Initial AJAX Call for Loading Data

Here is the typical sequence of events when someone navigates to a page in my application: The user navigates to my application, including URL parameters and query strings. The server receives the ...
3
votes
1answer
368 views

Should JavaScript and PHP objects be treated as different objects in an interaction diagram?

I'm drawing a communication diagram for an application where you can buy books. I'm using domain-driven design and have a 'shop' object, a 'cart' object, and a 'book' object. My first communication ...
-2
votes
1answer
295 views

is it good practice to reload a div every second [closed]

I am working on a networking site where I need to reload the notification div every second. I wanted to know is it good or bad to load it every second as there are some other divs also loading after ...
0
votes
2answers
155 views

How can I solve this potential security exploit (concerning the saving of REST resources)?

I have a File database table with the following columns: Id (PK), Filename And a Document database table with the following columns: Id (PK), Name, Description, FileId (FK) When a user wants to ...
0
votes
1answer
562 views

How exactly can I check for new rows in sql with ajax? [closed]

How do certain services, just like google plus and facebook, check for new content without reloading the page? Whenever you are on any of those websites a new notification of a post related content ...