Answered By | Answer - ID: 00041 | ||||
---|---|---|---|---|---|
Simon Goodwin On: 7/19/2017 | |||||
Answer On the Server side, I found one of the easiest ways to check if the request that just landed, is actually a refresh of the existing page that was already rendered to the browser.
I achieved the desired result by implementing following code in one of my controller method: -
Within the code, we are checking if for a particular session, the request is for the first time, we just store the requested url in the Session variable. We do nothing other that this here. Upon second request, we check if the requested url matches the one placed in Session. If such is the case, it is a Refresh request. We either return null from a custom function or do whatever needed. If the requested url does not match with the one stored in Session, it is a new page request. The new page url gets stored in Session in this case. |
|||||