reloading the page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oll3i
    Contributor
    • Mar 2007
    • 679

    reloading the page

    Is it possible to block reloading the page?
    thank You
  • johnhjohn
    New Member
    • Dec 2006
    • 43

    #2
    It isn't possible to prevent reloading the page, but it is possible to help avoid the page being refreshed:

    Code:
    <body onunload='window.close();'> // will close window on leaving page or reloading
    Be aware that the user will probably be prompted about whether or not they wish to close the window, and if someone clicks on a link the page will close.

    There aren't any very efficient ways of doing what you want.

    I hope I helped :)

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      You can use onbeforeunload (non-standard, but supported by a number of browsers). Its best use is in web applications where by going back/reloading, the user will lose all their unsaved work.

      Comment

      Working...