0

There is a bug I am researching that during the process I discovered different results between the following two scenarios:

Scenario 1) A link with no get or post data brings me to page A. On page A I perform several AJAX calls that refreshes and changes some data displayed on the page. Then I click on a link to page B. To return to page A I click the back button.

Scenario 2) A link with no get or post data brings me to page A. On page A I perform several AJAX calls that refreshes and changes some data displayed on the page (same as Scenario 1). Then I click the refresh button.

What is the difference between these two scenarios in addition to non-hidden input fields being repopulated?

Specifically what I'm encountering that has prompted this question is that jGrowl is re-displaying messages on page A upon clicking the back button but is not re-displaying the messages if I hit refresh. I suspect this is by design in jGrowl or a side effect of the nature of the difference in the two scenarios above. Any thoughts on this would be helpful, thanks.

ktamlyn
  • 4,519
  • 2
  • 30
  • 41
  • its dependent on the browser, browser version, platform, and how you got to that particular page – bizzehdee Feb 26 '13 at 17:29
  • I stated how "I got to that particular page". I am interested in browser differences too. Feel free to list these! – ktamlyn Feb 26 '13 at 17:41

1 Answers1

0

jGrowl will only display what it is told to display for the particular state of that page. It has no session or concept of history. If you click 'back' and the page you are going back to has the same $.jGrowl("Message") calls from the first visit then those will execute just the same. The way to avoid this is to change the caching headers on the page so that it will be fetched new.

stanlemon
  • 399
  • 3
  • 10
  • There are ajax calls being made by user input. This is not repeated upon revisit (the ajax does not execute) yet the jGrowl message reappears. The solution that was obtained does have to do with loading the page fresh. You state that it has no session, but in what manner are the messages being stored in memory? (not all things are cached when you leave a page and return) – ktamlyn Mar 21 '13 at 12:18