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

learn more… | top users | synonyms

0
votes
0answers
18 views

Ajax request showing browser response data but how i can var_dump data in controller function in laravel

Route File Route::post('/like',[ 'uses'=>'postController@postLikePost','as'=>'like' ]); Ajax Request File var token = '{{Session::token() }}'; var urlLike = '{{ route('like') }}'; $(...
1
vote
1answer
73 views

How to display recent post on website and make own search engine ? With PHP

On OLX like Website , Anytime a user posts a new ad. It comes in top of the page. No search is involved in it. Which technology we can use to make such functions. Suppose X is visiting my website ...
1
vote
1answer
61 views

Client wants browser's back button to work on a website doing AJAX calls

I'm currently working with a client's website in which we are using ajax calls to show the content of the pages, we are doing this in a single div and obviously you don't move from the index. My ...
2
votes
2answers
127 views

Image resizing client side vs server side

When uploading a lot of images to a server, to minimize the space taken by the images, is it better to resize the images before sending to the server or upon receiving them? It seems to me that ...
-1
votes
2answers
98 views

React.js + Flux, immediate response during history back/forward

In Instagram (web), when you click back/forward arrows - I've noticed that the content isn't loaded from the server and it immediately show up. After reading the docs on react.js + flux, I had this ...
2
votes
1answer
45 views

RESTful HTTP and websocket in the same application?

If an application has already an opened WebSocket for live feeds, should I use it over AJAX for the other communications with the server? Because the connection is already opened, should we use it ...
0
votes
1answer
42 views

Caching and Website performance on IOS VS PC

I have a website that pulls from a database to display images/names/misc info. The pages are used on both IOS Devices (iphones,ipads,ipods so far) and on PCs using internet explorer and Safari/Chrome ...
1
vote
1answer
95 views

What is the approach for implementing FLUX in a CRUD application that pulls JSON data from the server?

While using FLUX in a CRUD application, according to what I understood, initially the data is returned from an AJAX call and then stored in the STORE. So, all the data that is currently viewed is only ...
0
votes
0answers
52 views

Web browser resetting connection

I have a web application that is hosted on an embedded device. This device has its own basic web server that can serve content just like any other web server. The web application in question is ...
1
vote
1answer
108 views

Building a real-time web-app with Ajax .post()

Usually, real-time web-apps are built with websockets, right? Well, let me be radical here - what if I used Ajax? Okay, okay, I know it has its limitations. You can't build Agar.io, sending data ...
0
votes
3answers
50 views

Do and Undo action in the same / different page - Is there a difference?

If I'm bulding an application like a social network and I implement a like / favorite button with AJAX, is it preferable to use one URL to like / dislike or 2 differents URL? If I use one, for ...
4
votes
1answer
252 views

Many asynchronous calls vs single call to the API

We are developing a REST API which among others is going to be consumed by an HTML5 frontend via javascript. The application is for use within the organization and usually has about 300 users, but we ...
0
votes
1answer
40 views

Can I use an external Mustache template without Ajax?

I wrote up a site using Mustache to template it. Right now though, the template is embedded in the page, which defeats the purpose of using the template since I'll need to copy it to any other pages ...
1
vote
1answer
78 views

What are the impact to the server when using ajax polling for live web pages?

I've been searching on the internet about using interval ajax polling for live web pages and I've been using it along with SignalR. Now I always read an article online about using ajax polling for ...
1
vote
1answer
3k views

Rendering partial View in MVC

i am not so familiar working with partial Views. The reason behind that is that I really do not have the basics of Jquery/JS/Ajax. But I recently found through some SO post that a partial view can be ...
0
votes
0answers
47 views

Managing pagination or cursor with deleting items in the list

I have a REST API that could GET, POST, PUT, DELETE models. My problem is when I paginate that with ajax call combining with DELETE operations. My problem comes after few steps list one page list ...
-1
votes
1answer
603 views

How to update ui lively without refreshing page [closed]

I am doing a web application using struts2 framework. After user login, I show a dashboard about the current status of the user. To show the Dashboard UI(JSP), I used to get the information from the ...
2
votes
1answer
118 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 ...
0
votes
1answer
89 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
111 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
4k 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
251 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
195 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
88 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
421 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
317 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
105 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
131 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
907 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
2k 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
589 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
236 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
221 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
920 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
108 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
375 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
134 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 ...
-3
votes
1answer
203 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
98 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
297 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
533 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
75 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 ...
7
votes
3answers
810 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
404 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
206 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
265 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
305 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
265 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
601 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
406 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 ...