how to refresh only a part of the page when F5 or refresh button is pressed

I’m designing a web application that has a shared menu for all pages. Due to this i decided to load the contents linked by the menu buttons inside a div, using jquery.

So, i have this:

     $  ("#AddNewProductBtn").click(function() {
       $  ("#content").load("addproduct.html");

I want to keep track of the page displayed inside the “#content” div. If the users refreshes the page i want to load the same page in “#content”. Is there any way to do this, or is there any workaround?

I saw some websites that use an iframe to load the pages, but when a user clicks a button in the menu the url is also changed. I didn’t find any info on how to do that.


newest questions tagged jquery – Stack Overflow

About Admin