View Single Post
  #1  
Old 09-21-2004, 09:53 PM
clamcrusher clamcrusher is offline
 
Join Date: Jul 2003
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Dynamic pages using XMLHttpRequest

Is this something in the works yet?

For a long time ive wanted to make a "module" for vbulletin which would allow users to see the next page in a thread, without having to reload the whole page. Significant bandwidth savings and resultingly less congested network, and i would imagine greatly decreased perception of page load time for users.

for example, lets say the forum defaults to showing 20 posts per page. each post could be given an id such as "post1" and then "post2" etc....

if the user clicked on the "next" link which would show them the next 20 posts in the thread, the entire page would not be reloaded. Instead, javascript would send a http request to the server, specifying which posts to give it, all in the background and transparently to the user. The server would need to output the queried posts as text/xml. Each post would be given an id attribute which would correspond to 1-20 "placeholders" in the already downloaded page.


Then, javascript simply swaps the content of id="post1" through id="post20" dynamically, replacing it with the new content fed from the server, and then of course load any new images in the posts yada yada.....

i had been (slowly) working on this for a while and must admit im very unfamiliar w/ javascript, but php im fluent. I just found out about the
XMLHttpRequest object and how it is widely supported by browsers, and how trivial it makes a task like this.

heres a demo of the concept

http://developer.apple.com/internet/...e/example.html


so again, is this currently being developed, or is it just a lot of work for little benefit? I really have no idea how much savings this would provide above and beyond Gzip, maybe its very little. But still.....
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01064 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete