javascript - How to create a front-end effect similar to the sidebar on YouTube that is fixed but the URL changes?
世界只因有你
世界只因有你 2017-06-12 09:28:05
0
5
887

In the sidebar on the left side of YouTube, when you click to switch the subscription channel, you notice that the sidebar is still fixed, but the url address bar has changed, which shows that this should not be achieved by relying on ajax.

In the current project, I don’t really want to use ajax to achieve such an effect, because it is not very conducive to users’ collection of web pages and seo, etc., but YouTube achieves URL changes that are conducive to users’ collection, and at the same time achieves similar results. How to achieve a good user experience with ajax? Could you please give me some general advice.

世界只因有你
世界只因有你

reply all(5)
Ty80

Modifying the url can be achieved through history.pushState. In addition, isn’t refresh-free ajax already very common?

我想大声告诉你

Brother, don’t you know if people use Ajax by looking at the Internet? There is no Ajax data coming from the sky?
In addition, modify the address bar URL. This is the pushState function of js.

给我你的怀抱

Front-end routing can achieve such a function

刘奇

like this?
http://www.thepetedesign.com/...

小葫芦

pjax partial content update

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template