Jul 26, 2008

Refresh Page After Back Button Hit

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..
Pages: 1, 2

free web hosting

Refresh Page After Back Button Hit

kvarnerexpress
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.

Reply

SqlByte
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

Reply

beeseven
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 -->

Reply

beeseven
Oops, I appear to have missed part of your post. Did you use any or all of those?

Reply

iGuest
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).

Reply

iGuest
Replying to Trap FeedBacker
Http://digg.Com/programming/Force_browser_refresh_when_pressing_the_back_button_in_Opera

Reply

iGuest
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

Reply

urtrivedi
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>

Reply

iGuest
perfect!
Refresh Page After Back Button Hit

Replying to beeseven
This worked perfectly for me! Thanks!

-reply by Leanne Boyd

Reply

iGuest
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

Reply

Latest Entries

iGuest
Answer to No-Cache problem
Refresh Page After Back Button Hit

This is what I do to accomplish the task of disabling the cache..



The head tag at the end of the document is important!



<html>

<head>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META HTTP-EQUIV="Expires" CONTENT="-1">

</head>

<body>

Body stuff

</body>

<HEAD>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META HTTP-EQUIV="Expires" CONTENT="-1">

</HEAD>

</html>



-reply by Brian hall

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Recent Queries:-
  1. back page refresh - 0.06 hr back. (1)
  2. html refresh - 2.12 hr back. (1)
  3. refreshing the previous page on back button jsp - 6.96 hr back. (1)
  4. how to do full page refresh if user hits back button - 7.48 hr back. (1)
  5. how to refresh the page when browser back button is clicked - 8.13 hr back. (1)
  6. after browser refresh not refreshing data - 8.01 hr back. (2)
  7. refresh page back button - 8.28 hr back. (2)
  8. back buttons on jsp pages - 8.60 hr back. (1)
  9. page refresh back button - 8.63 hr back. (1)
  10. reload page when back button click - 8.93 hr back. (1)
  11. php browser back button reload the page - 9.44 hr back. (1)
  12. how to load the page when back button is clicked - 9.54 hr back. (3)
  13. html force page refresh on back button - 10.32 hr back. (1)
  14. back button reload page - 11.16 hr back. (1)
Similar Topics

Keywords : refresh, page, back, button, hit

  1. Refresh Main Window By Clicking Link In Popup?
    (2)
  2. Refresh Php Page, But First .....
    (2)
    I'm working on this now, but I can't even think of how to write it, if it's possible
    (but I'm pretty sure it is)... I have a page, which has a small iframe on it which loads a php
    page showing the status of a server, and refreshes itself every 30 seconds or so.. that works fine..
    the only problem is, when it refreshes, it seems to take at least 1 second to show anything, and I
    don't like it going blank like that.. my question is, can I set the php to check the status
    every 30 seconds, and check to see if it's different from before, and if so, t....
  3. Multiple Drop Down Menus W/ Submit Button
    (6)
    I am building a page that will have 2 drop down menus and a submit button. The first menu will have
    one set of options, say colors (red, blue, green, yellow). The second menu will have another set of
    options, say sizes (small, medium, large). What I want to be able do is select a color and a size,
    click submit and have it go to the page for those options. So if a user picks 'Red' and
    'Small' and clicks submit they will be linked to page1.html. If they pick 'Blue' and
    'Large', they will be linked to page2.html, and so on. Any ideas how to ....
  4. Dynamic Button Size
    (1)
    In my application I have a custom tag that generates all the action buttons that the page needs. My
    problem is that in IE the space between the left side of the button and the image inside the button
    are not consistant. Some buttons have 3 or 4 more pixels of padding on the left side then others.
    This causes my buttons to be too large and hence the area the buttons are generated in stretches too
    far. I could wrap the buttons around to another line or add scroll bars.. but if it will fit in FF I
    think it should fit in IE as well. So my question is can I set the padding....
  5. Making A Refresh Link On Your Website.
    refresh local webpage (16)
    /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> post it on ur website
    CODE <a href="javascript:this.location.reload();" style="color:
    #000000; font-weight: normal">refresh</a> It can refresh local webpage. U
    can add it at ur forum so that each topic u are reading can be refresh easily. If ur website
    return to homepage after pressing I.E. refresh button, then u must need this coding. /cool.gif'
    border='0' style='vertical-align:middle' alt='cool.gif' /> Beacus visitors only w....
  6. Auto Refresh
    after page loads (9)
    Okay this seem like a siple enough task, I would like to tell an html page to refresh, but two
    conditions have to be met, 1) the page must have finsihed loading, 2) it must wait a given number of
    seconds, say 5. Buy the way this needs to be automatic. Thanks....
  7. Submit Button
    (3)
    I have a form on my page. I do not have a submit button, but when I hit enter on my text field, it
    is like I am clicking on a submit button. My page refreshes to the original state, and my values are
    reset. I found this out because I made a submit button and tried it. Is there a way to get around
    this? I am trying to use a javascript that captures the key strokes. That works, but then the submit
    like event still fires after my code runs, nullifying any changes my code has made. html4strict
    Code: CODE 1.      <form name="FormPictureInfo">   2.....
  8. Radio Button
    (4)
    I am trying to maintain the radio button selection on a Submit, but the form refreshes to its
    default selection. BTW, After a Submit is clicked, the radio form stays visible on the top of the
    screen while the query results are displayed on the bottom half of the screen (we're using an
    internal, embedded link). That's when the default selection comes into place. Any help would be
    appreciated. Please respond Kvarnerexpress.....
  9. Substitute Form Button For An Image
    homemade images in forms buttons (3)
    Hi, I have the next formular : CODE  <form method='post'
    action='index.php?mode=2&id=1'>                <input type='hidden'
    name='name' value='Canon Digital Ixus 700'/>                <input
    type='hidden' name='id' value='1'/>                <input
    type='hidden' name='qty' value='1'>                <input
    type='hidden' name='cost' value='40'>                <input
    type='submit' value='Add to ca....
  10. Button To Print Current Web Page
    (13)
    Hi, Does anyone know how to create a button that will printo out the current page. What I want to
    do is have the user fill out a form (containing name, address, zip, etc). They will then click on a
    "print" button and it will print out the form data. Any ideas? Thanks.....
  11. Enter Keypress Submits Wrong Button
    (2)
    Ive got a form, with a submit button on the left and a submit button on the right. By default on the
    enter keypress, the form submits the left submit button, but i want it to submit the right button.
    How would i accomplish this? kvarnerexpress....
  12. Refresh Web Page
    (6)
    Well this questioned wasnt answered in 2003 but hopefully somebody knows the answer, sorry if this
    is a simple question but can i force the web browser to refresh the page after pressing the submit
    button. Basically my cgi perl form copies a different jpeg with teh same name into my public_html
    folder every time the form is submitted, therefore i have to click on the refresh button in IE to
    see the different picture. I have tried Code: but it doesnt seem to work in IE6 ....

    1. Looking for refresh, page, back, button, hit

Searching Video's for refresh, page, back, button, hit
advertisement



Refresh Page After Back Button Hit



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE