Welcome Guest ( Log In | Register)



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Refresh Page After Back Button Hit
kvarnerexpress
post Jan 1 2006, 07:29 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



Hi. I have a page that is dynamically build through DOM manipulation. So, when I browse outside the page, and then click back, those dynamically created DOM objects are gone. Since I am also using JSP / Servlet technology, I can rebuild this page easily, which I have done.

Here is my dilemma. If the user leaves the dynamic page, then clicks back on their browser, I need the page they are going back to to refresh. I can't figure out how to do this. I've tried using the META tag, but it won't do it. Help would be appreciated. Thanks.
Go to the top of the page
 
+Quote Post
SqlByte
post Jan 2 2006, 02:09 AM
Post #2


Premium Member
********

Group: Members
Posts: 172
Joined: 18-August 05
Member No.: 10,836



uhm.. you cant do that, i think.
Becouse it wont be the same on every web browser. Try to view that page in IE then try in Opera... then try all of browsers smile.gif
Do you see that Opera uses page from cashe memory...
im not some exprert but this may help you, or not biggrin.gif
Go to the top of the page
 
+Quote Post
beeseven
post Jan 7 2006, 07:40 PM
Post #3


Privileged Member
*********

Group: Members
Posts: 629
Joined: 26-February 05
Member No.: 3,995



You can do this with meta tags. It won't actually refresh on every visit, but it will tell the clients computer not to store information about the page and instead completely re-download it on each view. You can use the following meta tags (don't know how many are necessary, but it wouldn't hurt to use all of them):
CODE
<meta http-equiv="cache-control" content="no-cache"> <!-- tells browser not to cache -->
<meta http-equiv="expires" content="0"> <!-- says that the cache expires 'now' -->
<meta http-equiv="pragma" content="no-cache"> <!-- says not to use cached stuff, if there is any -->
Go to the top of the page
 
+Quote Post
beeseven
post Jan 7 2006, 07:41 PM
Post #4


Privileged Member
*********

Group: Members
Posts: 629
Joined: 26-February 05
Member No.: 3,995



Oops, I appear to have missed part of your post. Did you use any or all of those?
Go to the top of the page
 
+Quote Post
iGuest
post Sep 27 2007, 11:33 PM
Post #5


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Someone new, responding with same problem as SqlByte.

I tried this solution and it didn't work. Just letting you know. Using Mozilla Firefox. I used all 3 lines. I tried another meta tag, with <meta http-equiv="refresh" content="2"> which does work, but after the initial refresh, I don't want the page to reload each and every time thereafter (always shows it's loading, something people round here would get real antsy about).
Go to the top of the page
 
+Quote Post
iGuest
post Mar 30 2008, 08:03 PM
Post #6


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Replying to Trap FeedBacker
Http://digg.Com/programming/Force_browser_refresh_when_pressing_the_back_button_in_Opera
Go to the top of the page
 
+Quote Post
iGuest
post May 3 2008, 01:55 PM
Post #7


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Can anyone help me, prevent blank screens between page switches
Refresh Page After Back Button Hit

Hi I am trying to optimise my site. The situation is this. When a link is clicked and the new page is loaded, my site is intermediate blank.

Is there a way where the screen is not blank for a few seconds while the new page load?

Fyi. I am running: wamp and drupalcms the pages are in php.
Thanks for the help,



-question by Joel
Go to the top of the page
 
+Quote Post
urtrivedi
post May 26 2008, 06:58 AM
Post #8


Newbie
*

Group: Members
Posts: 2
Joined: 26-May 08
Member No.: 62,676



I think work on cache and meta tag will not help much, if you want to reload previous page when back is clicked.
I tried many things. Every browser has it own objects so it is difficult to implement.
One little and less effective solution is that you keep one button on your page say "Back"

<script lang='javascript'>
function btnback_click()//go back to previous
{
window.location.href="previous_page.php";
}
</script>

<body>
<input type=button name=btnback id=btnback value=Back onclick='java script:btnback_click()/>
</body>
Go to the top of the page
 
+Quote Post
iGuest
post Jun 8 2008, 07:57 PM
Post #9


Hail Caesar!
*********************

Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



perfect!
Refresh Page After Back Button Hit

Replying to beeseven
This worked perfectly for me! Thanks!

-reply by Leanne Boyd