vojtech-dobes / history.nette.ajax.js

Adds History API support to nette.ajax.js addon!
30 stars 27 forks source link

Prevent specific snippets from being cached #8

Closed jiripudil closed 10 years ago

jiripudil commented 10 years ago

This allows users to prevent snippets from being cached. It can be turned on using data-history-nocache attribute on a per-snippet basis (works only with n:snippet macro though as of current implementation in Nette).

Use case: we navigate to a product page using AJAX and add the product to cart, invalidating a snippet with cart contents. Pressing Back, the cart snippet is reloaded from cache, losing its actual content.