What is the difference between history.go () and History.back ()?

Source: Internet
Author: User

What is the difference between history.go () and History.back ():

Go () and back () belong to the history object, functionally similar, such as History.go (-1) and History.back () can return to the previous page, as if it is the same, in fact, there is a difference, the following is a brief introduction of their differences:

I. History.go (-1):

History.go (-1) Returns the previous page reads the contents of the cache and does not have a refresh feature.

Two. History.back ():

History.back () Not only returns to the previous page, but also has the refresh feature, which means that the latest content can be read from the server.

Three. How these two functions are selected:

You can choose History.go (-1) When you have a large number of form contents, because there is no refresh function when returning, so you can prevent users from repeating it. The specific situation of the specific analysis it

The original address is: http://www.51texiao.cn/javascriptjiaocheng/2015/0519/1867.html

The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=8391

What is the difference between history.go () and History.back ()?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.