0

I am talking about list pages in which I am using many filters. Actually these filters are in a user control and are ajaxified. Can I cache the state of the page after applying say 4-5 filters, so that if I move to another page after applying these filters and then return to the original page by pressing back button I will see the same filtered state of the page? I am not changing the url after applying any filters. Can this be done by output caching?

Josh
  • 10,961
  • 11
  • 65
  • 108
Mac
  • 6,991
  • 8
  • 35
  • 67

1 Answers1

0

What you're asking for really has nothing to do with caching. Well, it does, but not the kind of caching I think you're talking about :-) FireFox has what is known as the bfcache, which stores the state of a page's DOM as it was when you navigated away from that page. This is used so that when you return to the page, it will look the same as it did when you were there last.

However, certain events cause the bfcache to not be used. For example, this question details how the unload event affects things. If I were you, I would revisit the "I am not changing the url after applying any filters" statement -- I would reccomend storing the state of the page in a docuemnt.location.hash. Here's a question which details that concept

Community
  • 1
  • 1
Josh
  • 10,961
  • 11
  • 65
  • 108