Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is better to load 10 xml files than 1 bigger using Jquery/Ajax?

Status
Not open for further replies.

Gzk2010

Programmer
Aug 17, 2010
48
US
1. I am a newbie, and from my understanding since ajax is loading in parts, you should breaks the parts down.
My page has 20 little chapters with story with 20 illustrations. So correct me if I am wrong, if I just make my 1 working xml file with 20 image references and the chapter text into lets say 10. It will load it asynchr xml file 1 to 10(with 2 chapters and images per xml files)?

2. So if my approach is correct which is the first I ask,
then I would need 10 different jQuery/AJAX calls like? Note the 1.,2.,3.,4. below are NOT part of the code, please ignore them, they are line numbers I cannot get rid of.

1.$.ajax({

type:

"GET"
,
url:



"chapters_1_2.xml"
,
dataType:


"xml",
2....
3.$.ajax({

type:

"GET"
,
url:



4."chapters_3_4.xml"
,
dataType:



"xml"
,



...etc. Is there a way to simply write ?
1.2.url: "chapters_1_2.xml,chapters_3_4.xml,chapters_5_6.xml,chapters_7_8.xml",

ect til chapters_19_20. And my questions does anyone know for sure that the above Ajax method will understand to load first file at a time, 1 at a time?
3.Thanks in advance!Adam
.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top