Table of Contents
Reply content:
Home Backend Development PHP Tutorial javascript - What do you need to do on the server when learning AJaX?

javascript - What do you need to do on the server when learning AJaX?

Oct 19, 2016 am 10:40 AM
ajax javascript node.js php

I teach myself how to make web pages and want to use ajAx technology.
Doesn’t his technology require the browser to request information from the server, then the server responds and returns the information, and then the browser processes the information?
I am local (the computer where I study), how should I operate without a server?

If I have a server, what should I write on the server to receive requests from the browser? returned messages? Is it using javascript language? Or do you need to use Node.js and PHP to operate the server?

I hope someone can give me some knowledge. Thank you in advance.

Reply content:

I teach myself how to make web pages and want to use ajAx technology.
Doesn’t his technology require the browser to request information from the server, then the server responds and returns the information, and then the browser processes the information?
I am local (the computer where I study), what should I do without a server?

If I have a server, what should I write on the server to receive requests from the browser? returned messages? Is it using javascript language? Or do you need to use Node.js and PHP to operate the server?

I hope someone can give me some knowledge. Thank you in advance.

  1. Debugging of ajAx must require the server side

  2. But the so-called server side is not necessarily a real server, but just an http service that can provide data return. You can build it locally (you can use node.js to build it locally)

  3. Ajax server data is not essentially different from ordinary http services (the only difference is actually the data content (format) - defined by your program)

  4. All ajax requests are actually ordinary http requests. You can even build a fully static http service to support ajax program debugging. Of course, if you want to debug a very complex ajax program, the server generally needs to be able to handle some dynamic transfers. information coming.

  5. However, generally ajax programs are actually developed jointly between the client and the server

The browser sends an ajax request-->The server receives the browser's request-->The server processes the data-->Returns the data to the browser-->The browser processes
https://cnodejs.org/api /v1/topics This is an interface provided by other websites

Every computer can be regarded as a server.

For Nodejs, you can try the Express application generator to quickly create an application skeleton

Generally speaking, when it comes to simply learning AJAX, you don’t need to configure your own server. There are many cross-domain APIs available on the Internet.

Just create an integrated environment wampserver locally

Recommend you a simple and easy-to-use API PHP framework www.phalapi.net
You can quickly get started with back-end interface writing

Submit the front-end information to the server through ajax. After receiving the information, the server returns response data to the client, and then the client receives the response data from the server and processes it. At this time, you can understand that ajax is an http server, used to provide the front end with the ability to initiate interactions with the server. The server usually needs a back-end language to write the API and expose the API to the front-end for use.

You request the server address, and then the server just returns the data for you to parse.

I have also just started self-study, and currently use wampserver to build a local server, with PHP and Apache servers.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

CakePHP Working with Database CakePHP Working with Database Sep 10, 2024 pm 05:25 PM

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

See all articles