You can use the "referrer" header to check the page from which the request was made. However, it will not work in all cases.
One way is to set the cookie on http: // localhost / display and disable it on http: // localhost / save . Thus, you need to know if the user visited the display before saving.
Shamit verma
source share