Connecting Tech Pros Worldwide Forums | Help | Site Map

refresh

Newbie
 
Join Date: May 2007
Posts: 1
#1: May 15 '07
What is the code to be used to refresh the current page which is created by ajax

dmjpro's Avatar
Lives Here
 
Join Date: Jan 2007
Location: India (West-Bengal)
Posts: 2,451
#2: May 15 '07

re: refresh


Welcome to TSDN.

I got ur problem.
Actually ur page comes from cache.
that's why u want to get a fresh copy.

i think it is not possible to refresh a page which generated by AJAX.
so u better to manage the cache control by adding cache related headers into response.
or u can request the page like ..... ur_page?rand_id1=a_random_number1&rand_id2=a_rando m_number2

i think u can get the fresh copy every time.
best of luck.

kind regards.
dmjpro.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#3: May 15 '07

re: refresh


Quote:

Originally Posted by sijinfrancis

What is the code to be used to refresh the current page which is created by ajax

What do you mean "created by ajax"?
Expand|Select|Wrap|Line Numbers
  1. location.reload()
refreshes the page.
dmjpro's Avatar
Lives Here
 
Join Date: Jan 2007
Location: India (West-Bengal)
Posts: 2,451
#4: May 16 '07

re: refresh


hello acoder.

I think you misunderstood his Q.
He can not get the fresh copy of the page whenever he getting the page using AJAX.
Actually he must know how to refresh a page.

Sorry ACODER... if anything is wrong with my attitude plz forgive me.

kind regards.
dmjpro.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#5: May 16 '07

re: refresh


Quote:

Originally Posted by dmjpro

hello acoder.

I think you misunderstood his Q.
He can not get the fresh copy of the page whenever he getting the page using AJAX.
Actually he must know how to refresh a page.

Sorry ACODER... if anything is wrong with my attitude plz forgive me.

kind regards.
dmjpro.

I think you're probably right. The problem is that you don't "create a page" with ajax.

Nah, nothing wrong with your attitude.
Reply


Similar JavaScript / Ajax / DHTML bytes