How does navigation through emails in Gmail?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/code-flow.club/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
24 views
In the web Gmail interface navigation letters done in the following way:

Initially, we visit Inbox


Click on a letter and get on

This opens the letter itself.

As you can see, we work through the "grid" #, so the page is reloaded, not proishodt, instead, go "the anchor". However, the URL changes and the browser makes the transition without sending a request to the server, resulting in instantly opens the text of the letter (which is already stored in the DOM via JS and displays to the user) and becomes available to the Back button in the browser, obviously. If pressed, we return to the message list, the text of the letter thus concealed, of course without reloading the page, and it is very fast.

Question: How does it work? Specifically, after clicking "Back". We are working on the same page, you need to somehow close an open letter. How does this mechanism work? What is the event processed? I hope the essence of the issue is clear.
by | 24 views

4 Answers

0 like 0 dislike
by
0 like 0 dislike
In GWT there are means to assign handlers for different history token (the one after #).
\r
\rhttp://examples.roughian.com/index.htm#Tutorials~History_Support
\r
Not sure, but I suspect that gmail is also based on GWT.
by
0 like 0 dislike
Timer viewer's url and generating the necessary events. Events change the url in the browser not.
\r
The Back button is served by the browser itself when you change the url.
by
0 like 0 dislike
>> In reality, the program opens the letter, and then the event is affixed to an anchor
\r
How do you then explain that if there is an open letter. Copy the url of the type https://mail.google.com/mail/?shva=1#inbox/19c8764cb4a704af inserted in another tab, and re-open the letter. That is, the content depends on the url, and not Vice versa.
\r
Also if you look at the left menu: there's just the links: https://mail.google.com/mail/?shva=1#inbox, https://mail.google.com/mail/?shva=1#mbox, https://mail.google.com/mail/?shva=1#starred etc... But after the customer clicks the link in the bowels of GWT is triggered, the handler changes the url, pulls the handler corresponding to the token (inbox/mbox/starred) and the processor displays the desired content.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
asked May 22, 2019 by bearbeat
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
22,131 users