Friday, 4 September 2015

AJAX Introduction

Introduction

AJAX stands for Asynchronous JavaScript and XML. AJAX is not a new programming language, but a new way to use existing standards.
AJAX is the art of exchanging data with a server, and updating parts of a web page - without reloading the whole page.

Asynchronous JavaScript and XML?

A is for “asynchronous”
Requests can be made asynchronously or synchronously.
Both techniques allow web page to be updated without refreshing it.

JA is for “JavaScript”
Typically JavaScript is used on the client-side (in the browser).
Any language that accept HTTP requests and return HTTP responses can be used for server side.

X is for “XML”
Request and response messages can contain XML.
Can really contain any text (single text value, delimited text,…)

Why we need AJAX?

  1. Faster than the normal approach.
  2. More Interactive.
  3. Allows Asynchronous calls.
  4. Less Bandwidth usage.
  5. Ajax is server-agnostic.
The below 2 pictures explains, how AJAX loads partially without refreshing.

Normal Approach

 

client server interaction normal way






  

AJAX Approach

ajax approach


What are required to make a  Ajax call?

The following components are required to make a Ajax call.
  1. HTML.
  2. Cascading Style Sheets.
  3. Java Script & DOM.
  4. XmlHttpRequest / ActiveXObject.
  5. XML & JSON.
we will see how to make a call and How it works in next posts.

Monday, 29 June 2015

You don't have permission to access / on this server - Wamp Apache

Access issue in Wamp Apache


After the first installation of wamp, you might see the below error,

You don't have permission to access / on this server


 

[caption id="attachment_664" align="aligncenter" width="300"]apache access apache access[/caption]

Please follow the below steps to solve it.

Solution:



  1. Open C:\wamp\bin\apache\Apache2.2.21\conf\httpd.conf

  2. On line number 46, replace  'Listen 80' with 'Listen 0.0.0.0:80' and save the file

  3. Restart the wamp server

  4. Clear all browser history

  5. check localhost now.