Results 1 to 8 of 8

Thread: Reloading a page via a Back button

  1. #1
    Join Date
    Aug 2005

    Reloading a page via a Back button

    Is there a way in ASP to make a page reload either through the broswers back button or a forms?

  2. #2
    Join Date
    Jun 2006
    What you want to do is make the page non-cacheable so the page is always reloaded.

    Add this to the top of your webpage:

    <% Response.CacheControl = "no-cache" %>
    <% Response.AddHeader "Pragma", "no-cache" %>
    <% Response.Expires = -1 %>


  3. #3
    Join Date
    Aug 2005
    Thanks alot, that did the trick. You guys rock here.

  4. #4
    Join Date
    Jun 2006

  5. #5
    Join Date
    May 2006
    Sydney, Australia
    Also have a look in the IIS setup, there is an headers option that globally sets this.

    Look under properties --> http headers --> Tick enable content headers --> Set Expire immediately

  6. #6
    Join Date
    Aug 2005
    I was also wondering if some one wouldn't mind taking a look at this for me, as it is sort of stumping me.

    I'm builiding an online insurance application, where people input thier data, and it gives them rates, then lets them apply.

    Here is the url:

    You will need to supply a valid zip, as it does a check for areas the insurance is available. You can use 23834

    The issue I'm having is on the the next page there, intro-page2.asp, if you fill in your information or select add a child and then submit that, it takes you to the page with your quotes. No problem there. The problem is that if you use either the back button I have on the page or the browsers in IE, nothing is retained and the dropdowns disappear. But in FF, everything is fine.

    Is this a cookie issue or something security wise related to IE? IE has become a real thorn in my side on this project.

    Thanks as always for the assiatance.

  7. #7
    Join Date
    May 2006
    Sydney, Australia
    As its an ASP page it will be reloading from scratch (i am guessing)

    Saving the information in session variables and displaying them, set the sessions to blank to start with, so that even on the first load it will load them (just nothing to show).

    Then hopefully if someone clicks back it might display them for you.

    I think the problem with the back button is it behaves differently in different circumstances, and not always as we would like. I'd try and discourage the user from pressing it.

  8. #8
    Join Date
    Aug 2005
    Yeah, thanks.

    I feel much the same way, we are adding our own navigation, as I really don't want to rely on the browsers buttons. But, in my case here, thats not really the issue. The real reason I'm jumping through all these hoops is because of the dynamically created "Add Child" elements on the page.

    What's happening is, that once the page loads intially, and you submit the form, it dynamically creates the numbered Div elements, and those values are cached. So, when you press the back button and try to re-add them it doesn't work unless you reload the page, thus reseting those Div elements through JavaScript.

    I guess the irrating part for me is that in FF, even with the page reload, it will keep the session variables as you described above. But of course, IE doesn't want to play nice. I've tried to re-intialize the page(call the JS function) through several diffrent means, but thus far no luck. I've looked on here and some other websites, and I'm not really sure even if I re-wrote the JS code that it would behave as I need it to.

    But thanks for the input & suggestions. If anyone can think of another alternative solution to this, I'm all ears.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.13507 seconds
  • Memory Usage 2,899KB
  • Queries Executed 13 (?)
More Information
Template Usage (32):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (8)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates