How does DuckDuckGo have endless scroll results, but the back button works as expected if you follow the site off-site?

Examples of search results for 'apple' in DDG: http://duckduckgo.com/apple

If you scroll down the page several times, the results will be obtained using ajax. Then you click on the link, click on the "Back" button, and the DDG page is exactly the same as you left it.

How?

+4
source share
1 answer

I noticed that the d.js file is added to the page and contains all the links to the result. Could it be the way they do it?

If all links are loaded from a JS file, and your cached version of JS is the last (largest) page of links, this will leave all the results. You do not know how they force the d.js file to be cached, since it contains a query string.

0
source

All Articles