dotslashlu
dotslashlu

Reputation: 3401

Why google plus seems using ajax to load page content but the url changes?

Typically, when one page is being loaded(when url changes), the first request is the document, but I didn't see document request when click link in gplus, and the url in the address bar sure changed!As you see in the picture bellow.

The first several requests are for scripts and others are all images.I'm quite confused, if they are using scripts to load contents why the url is changing? And if they change the location why is there no request for the page and the animations seem so smooth when redirects to another page.

enter image description here

Upvotes: 2

Views: 386

Answers (2)

Robin
Robin

Reputation: 21884

First, you just missed (I don't know how) the requests, because they are there ;) Just use chrome dev tools for instance, and you'll see them.

Using HTML 5, you can manipulate the browser history and actually change the URL: https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history

Upvotes: 2

bfontaine
bfontaine

Reputation: 19819

Because they are using pushState ;) It allows you to add some URLs (for the same domain, of course) in the history, via JavaScript.

Upvotes: 3

Related Questions