After Window.history.pushState() go back to prev URL

7331

New Member
I have grid of products. Each product row in the grid can be expended to show the full product details (done with Ajax).For SEO purposes when a row is expended am using :\[code\]window.history.pushState()\[/code\]to change the URL.For example: URL such as:\[code\]http://mydomain.com/bouquets/cityName\[/code\]will be changed to:\[code\]http://mydomain.com/bouquets/cityName/prodId\[/code\]The problem is when another row expended the new URL will be:\[code\]http://mydomain.com/bouquets/cityName/prodId/prodId\[/code\]The third row expended:\[code\]http://mydomain.com/bouquets/cityName/prodId/prodId/prodId/\[/code\]and so on...When a row expended after the first time, I need to do in JS something like:\[code\]<a href= "http://stackoverflow.com/questions/URL" >\[/code\]
 
Top