IPB

Welcome Guest ( Log In | Register )



Tags
This content has not been tagged yet
2 Pages V   1 2 >  
Reply to this topicStart new topic

Refresh Page After Back Button Hit


kvarnerexpress
no avatar
Super Member
*********
Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



Post #1 post Jan 1 2006, 07:29 PM
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
no avatar
Premium Member
********
Group: Members
Posts: 172
Joined: 18-August 05
Member No.: 10,836



Post #2 post Jan 2 2006, 02:09 AM
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
no avatar
Privileged Member
*********
Group: Members
Posts: 629
Joined: 26-February 05
Member No.: 3,995



Post #3 post Jan 7 2006, 07:40 PM
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
no avatar
Privileged Member
*********
Group: Members
Posts: 629
Joined: 26-February 05
Member No.: 3,995



Post #4 post Jan 7 2006, 07:41 PM
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
no avatar
Hail Caesar!
*********************
Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Post #5 post Sep 27 2007, 11:33 PM
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
no avatar
Hail Caesar!
*********************
Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Post #6 post Mar 30 2008, 08:03 PM
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
no avatar
Hail Caesar!
*********************
Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Post #7 post May 3 2008, 01:55 PM
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
no avatar
Newbie
*
Group: Members
Posts: 2
Joined: 26-May 08
Member No.: 62,676



Post #8 post May 26 2008, 06:58 AM
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
no avatar
Hail Caesar!
*********************
Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Post #9 post Jun 8 2008, 07:57 PM
perfect!
Refresh Page After Back Button Hit

Replying to beeseven
This worked perfectly for me! Thanks!

-reply by Leanne Boyd
Go to the top of the page
+Quote Post
iGuest
no avatar
Hail Caesar!
*********************
Group: Members
Posts: 5,876
Joined: 21-September 07
Member No.: 50,369



Post #10 post Jun 8 2008, 11:22 AM
solution to :Refresh Page After Back Button Hit
Refresh Page After Back Button Hit

Inculde the below code in each page of the project...

<input type="hidden" id="refreshed" value="no">

Though this is not the real solution butone of the trick we can do to acheive this

-reply by Jugal Kishore Mahendra
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No new 26 templest 31,463 15th June 2009 - 07:12 AM
Last post by: gannimel
No New Posts   6 galexcd 1,286 27th June 2007 - 03:56 PM
Last post by: alex7h3pr0gr4m3r
No new   35 Roly 31,537 13th August 2004 - 10:10 PM
Last post by: annylei
No New Posts   6 saitunes 1,372 20th November 2009 - 03:43 AM
Last post by: iG-harsh
No New Posts   4 Greven il-Vec 6,098 18th August 2004 - 11:38 AM
Last post by: odomike
No new   15 zip_mc 11,991 27th August 2004 - 05:29 PM
Last post by: serverph
No New Posts   3 NeXDesigns 5,423 8th September 2004 - 02:14 AM
Last post by: Zenchi
No New Posts   10 spawn_syxx9 10,440 10th September 2004 - 06:08 AM
Last post by: wassie
No New Posts   3 outwarsecrets 5,764 15th September 2004 - 06:54 PM
Last post by: outwarsecrets
No New Posts 0 solankyno1 822 23rd February 2007 - 07:31 PM
Last post by: solankyno1
No New Posts   2 SEOClark 1,202 23rd February 2007 - 07:19 AM
Last post by: SEOClark
No New Posts   5 X3r0X 7,630 28th September 2004 - 05:39 AM
Last post by: X3r0X
No New Posts   9 zip_mc 9,197 12th October 2004 - 09:26 PM
Last post by: arash
No New Posts   0 Anvilpinata 15 Yesterday, 05:11 AM
Last post by: Anvilpinata
No New Posts   11 JaVe 10,573 14th October 2004 - 10:16 AM
Last post by: JaVe


 



RSS Open Discussion Time is now: 22nd November 2009 - 10:51 AM

Web Hosting Powered by ComputingHost.com.