Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1083895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:29:37+00:00 2026-05-16T22:29:37+00:00

In my website I’ve two pages called First.aspx and second.aspx. From first.aspx I’m redirecting

  • 0

In my website I’ve two pages called First.aspx and second.aspx.

From first.aspx I’m redirecting user to second.aspx clicking upon a link.

In second.aspx page, I’m using javascript:history.back() on click of a cancel input button (not asp button). This is done to avoid reloading of last page as user has not done anything on this page, and clicked on cancel to go back to the previous page.

I’m wondering whether there are any security issues or any other issues related to using this history.back()? If so, what kind of issues are they?

Instead of this, should I use asp button and redirect back to first page using response.redirect()? Which one is better approach?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:29:37+00:00Added an answer on May 16, 2026 at 10:29 pm

    I suggest to avoid the history.back() except for some rare using page that you can not do otherwise.

    Why to avoid.
    First reason is the case that a user open a new page, or save this page (and open it later) and have no previous page to go. With that way he can not go to “cancel page”.

    Also there is the case that some one else from other page redirect him to your page (maybe this is a security issue ?) This case also the cancel return him to the previous page… Some time search sites open your page in a frame to just show a photo from your page, also this is a case the the .back maybe not work properly.

    Second reason, the go back is not correctly working when you have ajax calls/updates and must be handle with different way.

    Third reason is that the cache of the page is not depend from the go back or from the redirect. On both cases the page can be reload or not, this is depend from what you have set on the header of the page, and how browser handle it.

    And also there is the case that the user do not have javascript (or have it disable), or the javascript product an error and not working for any random reason.

    And one more also very important. If you have make post back on the previous page, then the go back, is generate again post back ! You need to redirect him to the previous page.

    Hope this help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our website sends e-mails to the e-mail address which a user enters on our
My website consists of two frames, let's say upperFrame and lowerFrame. On the document
My website's root page automatically redirects all users to some subpage via http header.
My website structure has a root /index.php, some files as /directory/index.php and some as
My website has a large number of readers every day. I wanted to track
My website allows uploading of images. I limit images to 10 megapixel or less
A website I work on is currently running three different instances of Wordpress blogs,
The website I am developing uses jQuery UI tabs to load content via AJAX
My website is in the root directory, which is /www.lebmotor.com/web/content/ . I am using
My website is set to UTF-8, do i have to set my forms also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.