Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I recently noticed that when opening my Gmail account, the URL gets changed to ?shva=1#inbox at the end (this can be noticed in the address bar).

This happens not only to my Gmail ID, but to others as well. This make me think that Gmail provides a common interface to all its users and changes it accordingly.

What happens in the background, and what does the shva=1#inbox part mean?

share|improve this question
add comment

1 Answer

up vote 142 down vote accepted

When you log in, the system wants to know if it's a valid account or whether it should kick you back to the login screen.

According to Mike Sego, a former Gmail engineer, "shva" is an acronym for "should have valid authentication". Apparently, the parameter is only included after a successful authentication.

The 1 is the default value applied to the parameter check. It's also a shorthand way for programmers to say true, like when you have successfully logged in.

The other part, #inbox, tells Gmail to load up your inbox as the first screen. You can change that to one of the other folders (or even labels you've created) to load them up.

E.g., https://mail.google.com/mail/?shva=1#sent will show your Sent folder items.
https://mail.google.com/mail/?shva=1#label/narwhals will load up your "narwhals" label.

Gmail, like many web services, serves a standard interface that will change to show only your information and data when you've logged in.

The particulars are referenced on their end through the use of an ID from the cookies or sessions generated after the login screen.

share|improve this answer
1  
@Eight Days Of Malaise: First of all, a very big name(just kidding) and thanks for the answer! I have accepted yours, and I'm new to this site, so i could vote up, once i get the permission to do so, will do this :) thank you :) –  Ant's Mar 28 '11 at 15:04
50  
+1 for the shva acronym! –  Ciaran Mar 28 '11 at 16:09
4  
Oh my effing lord, I've looked for information about what SHVA stood for for ages! Thanks for finally putting primary documentation behind it. :) –  delfuego Mar 28 '11 at 17:54
13  
So it's not named after a Hindu deity –  Chris S Mar 28 '11 at 20:09
3  
You CAN target labels you've created. Example: https://mail.google.com/mail/?shva=1#label/Notes –  Nico Mar 29 '11 at 15:36
show 3 more comments

protected by Community Dec 17 '11 at 2:29

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.