JavaScript and Ajax
JavaScript is client-side scripting language. If you have a web page to download the web browser before all the necessary files from the server to display the page to open properly. The required files are HTML, CSS, images, videos, etc. and the JavaScript file. After downloading the browser, the page displays the window and will run every script associated with the script file you downloaded.
Ajax technology is user input and other data sent to the Web serverthrough JavaScript. JavaScript XML_HTTP_REQUEST_OBJECT created to connect to the server to send data and request a response from the server. The answer is, a JavaScript event is triggered and the function associated with the event is then executed. Ajax JavaScript technology is so used to program data between the client and server side, while the main data processing that is executed on the server side, PHP or other server-side language.
AsJavaScript runs on the client computer, its performance is very short, almost instantaneous. Viewers can use JavaScript without using the server as well connected. But Ajax, the public must be connected to the server. Here the execution time is much longer, depending on their connection speed to the Internet, server hardware and the number of bytes of the page are transmitted between client and server.
In terms of server security JavaScript is completely safe, becausedoes not transmit user input from the client to the server. But Ajax, you are entitled to pay special attention to prevent malicious data from the user harm.
In JavaScript, you can not hide the source code. Users can easily view the source code from view source code, their computer is running. But Ajax data processing is to end on the server and users can not see the source code of the program.
In Ajax, you can use the program with the server supportDatabase.
For a long-when to use JavaScript for their implementation, the size of your website will be greater. So it takes longer to download, depending on the bad SEO. But Ajax can program long, run the treatment of several thousands of data from a database, it still maintains your page size small.
Since all browsers do not strictly specific to a standard, so it is very easy to write a program independent of the browser JavaScript.
JavaScript is used in someApplications where data security is an important consideration, while the scope is unlimited use of Ajax technology.
Danos tu comentario
Post a Comment