What to use javascript History API v/s local storage for saving Ajax Data to load on Back Button

573 views Asked by At

I have an E-Commerce Site where I load a initial slot of products(10 products) into Product List at first. Later as user scroll down a service call get data using ajax call and append it to Product List using jQuery.

Now if user clicks on a product he will be navigated to Product Detail page, and from here if he click the Back, Product List page shows only 10 products.

I have gone through javascript History API as well as other solutions. Twitter also says it implemented it using history API, but it increases page latency slightly as mentioned here: implementing-pushstate-for-twitter.com Which way should I go ??

Or anyone else has a better solution for this situation, suggestions would be appreciated. Thanks in advance.

0

There are 0 answers