Download site without refresh?

Asked

Viewed 66 times

0

I’m looking to develop a website without page reload but changes the page url so that search robots like google can find the pages of my site more easily than with ajax. As for example this: Ondasul FM.

I know this process can be done with Javascript. Also with the plugin History js..

Someone would know how to do that?

  • See https://answall.com/questions/6626/como-crea-um-site-sem-reloade-a-cada-clique-num-link?rq=1

  • You actually need to use AJAX : see https://answall.com/questions/4450/browse%C3%A7%C3%A3o-sem-refresh

  • You will actually need to use ajax to do this follow some links https://www.w3schools.com/jquery/jquery_ref_ajax.asp https://answall.com/questions/4450/browse%C3%A7%C3%A3o-sem-refresh

1 answer

1


With the arrival of Html5 and its pushState you can easily, see the example below. Any doubt please ask again at most just take a look and understand how it works!

window.history.pushState("objeto ou string", "Titulo", "/nova-url");

I hope I helped! until next time.

  • Could you explain what I should pass where is "object or string"?

  • Yes, this first parameter is for if the status of the page is changed ( Example : by clicking the back arrow of the browser ) , this second you can simply ignore it by placing a null or anything, and the third is its url, if any questions remain or if I have not explained correctly please ask me to explain again in more detail.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.