优化ajax加载数据速度,使用JS,jQuery,ajax和& json,我需要帮助优化页面加载速度...

我正在使用jQuery构建用户配置文件页面,从json类型数据库中提取。我在使用ajax填充页面时相当缺乏经验,所以现在,页面加载需要太长时间。如果我可以帮助改进我的代码,优化和加快页面加载,我真的很感激。

目标:我正在尝试从为多个拥有多个数据点的用户构建的JSON数据库中获取信息。以下是JSON数据的示例。我希望在选择了标签后显示信息。

每个配置文件中都有大量数据,特别是出版物。用户可以拥有任意数量的pub,我的代码现在遍历所有数据,然后再将其写入页面。





{

"Error": false,

"Cached": false,

"Profile": {

"FirstName": "John",

"LastName": "Smith",

"PreferredName": "",

"Email": "JohnSmith@example.com",

"Gender": "",

"PhoneNumber": "1234567890",

"Office": "Todd Hall Addition 570B",

"EndowedPosition": "MAJOR POSITION #1",

"Biography": "THIS IS A BIOGRAPHY",

"Appointments": [

{

"Title": "Title 1",

"WorkingTitle": "",

"Rank": "",

"Department": "Department1",

"Start": "2014-01-01",

"End": ""

},

{

"Title": "",

"WorkingTitle": "",

"Rank": "Rank 1",

"Department": "Department2",

"Start": "2014-01-01",

"End": ""

},

{

"Title": "Title 2",

"WorkingTitle": "",

"Rank": "",

"Department": "",

"Start": "2014-01-01",

"End": ""

}

],

"IntellectualContributions": [

{

"Type": "Book",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Published",

"Title": "TitleMain",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": []

},

{

"Type": "Journal Article",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Published",

"Title": "TitleMain",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": []

},

{

"Type": "Manuscript",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Published",

"Title": "TITLEMAIN",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": []

},

{

"Type": "Book Review",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Published",

"Title": "Title",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": ["Author1"]

},

{

"Type": "Newspaper",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Published",

"Title": "Title",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": [

"Author 1",

"Author 2",

"Author 3",

"Author 4"

]

},

{

"Type": "Journal Article",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Published",

"Title": "Title",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": []

},

{

"Type": "Journal Article",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Published",

"Title": "TITLE",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": []

},

{

"Type": "Journal Article",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Published",

"Title": "TITLE",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": ["Author 1"]

},

{

"Type": "Journal Article",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Submitted",

"Title": "Title",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": []

},

{

"Type": "Journal Article",

"TypeOther": "",

"IncludeProfile": "Yes",

"Status": "Working Paper",

"Title": "TITLE",

"TitleSecondary": "",

"FirstName": null,

"MiddleName": null,

"LastName": null,

"Role": null,

"JournalName": "",

"Publisher": "",

"Volume": "",

"IssueNum": "",

"PageNum": "",

"WebAddress": "",

"CaseNum": "",

"YearPub": "",

"Authors": []

}

],

"Education": [

{

"DegreeType": "PhD",

"DegreeOther": "",

"School": "University",

"Major": "MAJOR 1",

"FocusArea": "Focus Area",

"DissertationTitle": "Dissertation Title",

"Highest": "Yes"

},

{

"DegreeType": "MBA",

"DegreeOther": "",

"School": "University",

"Major": "MAJOR 1",

"FocusArea": "",

"DissertationTitle": "",

"Highest": ""

},

{

"DegreeType": "BBA",

"DegreeOther": "",

"School": "University",

"Major": "MAJOR 1",

"FocusArea": "",

"DissertationTitle": "",

"Highest": ""

}

],

"Present": [

{

"Title": "Presentation Title",

"Type": "Oral Presentation",

"Name": "NAME",

"Authors": [

"Author1",

"Author2",

"Author3",

"Author4"

],

"Date": "2014"

},

{

"Title": "Presentation Title",

"Type": "Oral Presentation",

"Name": "NAME",

"Authors": [

"Author1",

"Author2",

"Author3"

],

"Date": "2014"

},

{

"Title": "PRESENTATION TITLE",

"Type": "Oral Presentation",

"Name": "NAME",

"Authors": [

"Author1",

"Author2",

"Author3",

"Author4",

"Author5"

],

"Date": "2013"

},

{

"Title": "PRESENTATION TITLE",

"Type": "Oral Presentation",

"Name": "NAME",

"Authors": [

"Author1",

"Author2",

"Author3",

"Author4",

"Author5"

],

"Date": "2013"

},

{

"Title": "PRESENTATION TITLE",

"Type": "Paper",

"Name": "NAME",

"Authors": [

"Author1",

"Author2",

"Author3",

"Author4",

"Author5"

],

"Date": "2012"

},

{

"Title": "PRESENTATION TITLE",

"Type": "Oral Presentation",

"Name": "NAME",

"Authors": [

"Author1",

"Author2",

"Author3",

"Author4",

"Author5"

],

"Date": "2012"

},

{

"Title": "PRESENTATION TITLE",

"Type": "Oral Presentation",

"Name": "NAME",

"Authors": [

"Author1",

"Author2",

"Author3"

],

"Date": "2012"

},

{

"Title": "PRESENTATION TITLE",

"Type": "Oral Presentation",

"Name": "NAME",

"Authors": [

"Author1",

"Author2"

],

"Date": "2012"

},

{

"Title": "PRESENTATION TITLE",

"Type": "Oral Presentation",

"Name": "NAME",

"Authors": [

"Author1",

"Author2",

],

"Date": "2012"

},

{

"Title": "PRESENTATION TITLE",

"Type": "Oral Presentation",

"Name": "NAME",

"Authors": [

"Author1",

"Author2",

"Author3"

],

"Date": "2012"

}

],

"Departments": [

"Department1",

"Department2"

],

"Research": [

"Research1",

"Research2",

"Research3",

"Research4",

"Research5"

],

"Teaching": [

"Teaching1",

"Teaching2",

"Teaching3",

"Teaching4"

]

}

}



非常感谢任何和所有帮助!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值