|
|
Registered tutorials: 501 Registered Users: 37398
|
|
Rating: 4 out of 5 votes cast
Category: Without XMLHttpRequest
|
Alternate Ajax Techniques, Part 1
Abstract: This article presents the alternative to using XMLHttpRequest - dynamic script loading. The concept is simple: create a new element and assign a JavaScript file to its src attribute to load JavaScript that isn't initially written into the page
By Nicholas C. Zakas.
By now, nearly everyone who works in web development has heard of the term Ajax, which is simply a term to describe client-server communication achieved without reloading the current page. Most articles on Ajax have focused on using XMLHttp as the means to achieving such communication, but Ajax techniques aren't limited to just XMLHttp. There are several other methods; we'll explore some of the more common ones in this series of articles.
Dynamic Script Loading
The first alternate Ajax technique is dynamic script loading. The concept is simple: create a new <script/> element and assign a JavaScript file to its src attribute to load JavaScript that isn't initially written into the page. The beginnings of this technique could be seen way back when Internet Explorer 4.0 and Netscape Navigator 4.0 ruled the web browser market. At that time, developers learned that they could use the document.write() method to write out a <script/> tag. The caveat was that this had to be done before the page was completely loaded. With the advent of the DOM, the concept could be taken to a completely new level.
|
Reviews:
Rate and Review This Site
No reviews yet
Statistic Information About this Resource:
| Total Hits: |
416 |
| Unique Hits: |
338 |
| |
Daily |
Weekly |
Monthly |
| |
Unique |
Total |
Unique |
Total |
Unique |
Total |
| Average |
0.1 |
0.1 |
0.9 |
0.9 |
6.1 |
8.1 |
| Current |
0 |
0 |
1 |
1 |
2 |
2 |
| Previous |
0 |
0 |
1 |
1 |
7 |
7 |
| Feb 12 |
0 |
0 |
0 |
0 |
5 |
5 |
| Feb 11 |
0 |
0 |
1 |
1 |
4 |
5 |
| Feb 10 |
1 |
1 |
0 |
0 |
11 |
13 |
| Feb 9 |
0 |
0 |
2 |
2 |
8 |
12 |
| Feb 8 |
0 |
0 |
0 |
0 |
3 |
4 |
| Feb 7 |
0 |
0 |
2 |
2 |
3 |
5 |
| Feb 6 |
0 |
0 |
2 |
2 |
18 |
28 |
| Feb 5 |
0 |
0 |
0 |
0 |
0 |
0 |
| Highest |
21 |
25 |
25 |
30 |
40 |
49 |
|
|
|
Script Execution Time: 0.41747 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2
|