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.
PHP中文网2017-06-12 09:30:05
Modifying the url can be achieved through history.pushState. In addition, isn’t refresh-free ajax already very common?
我想大声告诉你2017-06-12 09:30:05
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.