4 Replies - 2222 Views - Last Post: 25 April 2012 - 06:18 AM

#1 xikky  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 88
  • Joined: 19-December 09

Update a page without refresh.

Posted 24 April 2012 - 04:22 PM

I am asking for a good approach to update a webpage content without it being refreshed.

I am most familiar with asp.net and so I know I can use Ajax and panels for this. I also experimented and used HashChange JQuery plugin, and read about Ajaxify JQuery plugin. I am confused on what to choose for my website.

Is it a matter of preferences? Or is there one better and neater then the other? Are there any better ways?

I am aiming to use a static website (HTML + JS/JQuery) and I really prefer if the browser back and forward button still function properly for the updated content.

I am confused and would really appreciate if anyone would share any suggestions on how one will approach this situation.

Is This A Good Question/Topic? 0
  • +

Replies To: Update a page without refresh.

#2 TheITNinja  Icon User is offline

  • New D.I.C Head

Reputation: 15
  • View blog
  • Posts: 43
  • Joined: 14-April 12

Re: Update a page without refresh.

Posted 25 April 2012 - 02:53 AM

Hello xikky,

View Postxikky, on 24 April 2012 - 04:22 PM, said:

I am most familiar with asp.net and so I know I can use Ajax and panels for this. I also experimented and used HashChange JQuery plugin, and read about Ajaxify JQuery plugin. I am confused on what to choose for my website.


Which one you choose depends on multiple factors. If you are most familiar with the native asp.net ajax panels then I would suggest you use those. All those plugin's are certainly useful. However you will need to invest the time to learn them. If you are time limited then this may not be the best choice.

View Postxikky, on 24 April 2012 - 04:22 PM, said:

Is it a matter of preferences? Or is there one better and neater then the other? Are there any better ways?


In my view the "better" path would be not to use all of these libraries! speaking from experience, you can build very intense ajax based sites from scratch. Just a few lines of Javascript and a single "ashx" generic handler is enough.

However that is more my preference on how I build web applications. So ultimately yes it is a matter of preference. I would evaluate them individually and go with the one that best fits your need.

View Postxikky, on 24 April 2012 - 04:22 PM, said:

I am aiming to use a static website (HTML + JS/JQuery) and I really prefer if the browser back and forward button still function properly for the updated content.


This one is tricky when using an ajax approach. You can use things like "#!" methods or more modern approach such as the HTML 5 "History" feature I think. There certainly are solutions to this.

View Postxikky, on 24 April 2012 - 04:22 PM, said:

I am confused and would really appreciate if anyone would share any suggestions on how one will approach this situation.


As stated above, there are more than one way to do this. My bias would be native handcoded javascript + lightweight custom ashx handler. Others may prefer libraries. Yet another approach would be to use old school iframes with autorefresh in in the meta tags.

I hope that helps.

This post has been edited by TheITNinja: 25 April 2012 - 02:56 AM

Was This Post Helpful? 1
  • +
  • -

#3 xikky  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 88
  • Joined: 19-December 09

Re: Update a page without refresh.

Posted 25 April 2012 - 03:11 AM

Thanks you for your reply.

I have no time limits as such as I am building a website for myself. I can build the website using asp and ajax controls in no time but I am still learning in this world of programming so I would opt for something new. My aim is to build the website with server restrictions (if i may say!).

This morning I have found the following method and it looks very interesting:
https://gist.github.com/854622
But unfortunately it seems quite advanced to understand though it should be simple to implement.

And to get me even confused I also found this:
http://max.jsrhost.c...jaxify/demo.php
Which I think I'm able to implement on my own, but from what I see the history function (for back and forward browser button) does change the url but does not update the content.

I am sorry if I may be asking for obvious information! it's not the same from this side. Is there anybody who used these two jquery methods for ajaxifying a webpage and can help?

This post has been edited by xikky: 25 April 2012 - 03:13 AM

Was This Post Helpful? 0
  • +
  • -

#4 TheITNinja  Icon User is offline

  • New D.I.C Head

Reputation: 15
  • View blog
  • Posts: 43
  • Joined: 14-April 12

Re: Update a page without refresh.

Posted 25 April 2012 - 05:52 AM

I would highly recommend this e-book, it explains the HTML5 history in detail:

Dive Into HTML 5

Please do read this, it should hopefully help.
Was This Post Helpful? 1
  • +
  • -

#5 xikky  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 88
  • Joined: 19-December 09

Re: Update a page without refresh.

Posted 25 April 2012 - 06:18 AM

Thanks for the share! I am also currently working on, - and progressing by following ajaxify from: http://www.bydust.co...lementation.php

This is a very simple ajaxify tutorial that beginners like me should find comfortable to start playing with. Finally! :)

This post has been edited by xikky: 25 April 2012 - 06:20 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1