I need some help on determining whether the browser is coming into a webpage from a different page or merely reloading the same webpage. The reason is the following:
I need to have a cookie to indicate whether or not to fill in today’s date in a textbox on my webpage. A checkbox toggles the value of the cookie; by default, this cookie is set to true (as in the checkbox will be checked). I only want the date to be filled in when I enter the page. If I navigate to the page, the date should be filled in. If I change the date in the textbox and reload the page or navigate to the same URL, that date should not be overwritten with today’s date. If I leave the page and come back, today’s date should be filled in.
My plan was to check the cookie and when the onload event is triggered, but then when I reload the page the date keeps getting overwritten. Is there an easy way to solve this problem? Thanks in advance for any help.