49

What is the following portion of a Gmail URL for?

https://mail.google.com/mail/?**zx**=1efobg68r40co&**shva**=1#inbox

If you change it, nothing happens!!

I know Gmail is not an Open-Source program so we can't trace the code. But every website try to make the URL shorter so they ideally shouldn't add redundant data to the URL. At the same time they don't make any difference nor error if they change.

Edit: I know it's a parameter for a scripting language since I'm a PHP developer but as a developer I don't EVER add a useless parameter and I think it's obvious/primitive sense!

1

5 Answers 5

49

The acronym stands for "Should have valid authentication" as noted here:

http://googlesystem.blogspot.com/2010/07/gmails-shva-parameter.html

As others have noted, 1 is the default value.

0
10

If I'm remembering correctly, back when they were working on the current version of the interface, you could preview it by setting shva=2 instead of the default. That version is now the default and you can't get the old version, so shva does nothing now.

It may be used again in the future, who knows?

But every website try to make the URL shorter so they ideally shouldn't add redundant data to the URL...

This is self-evidently not true. Look at StackOverflow URLs for a perfect example. This post:

http://stackoverflow.com/questions/1692968/shva-in-gmails-url-what-is-this

could just as easily be (it works):

http://stackoverflow.com/questions/1692968

I don't think anyone worries these days about the extra couple bytes of data involved with an extra query string parameter.

3
  • 1
    I agree with this. using "shva" specifically might be related to en.wikipedia.org/wiki/Shva
    – Kumar D
    Jan 24, 2010 at 9:30
  • 17
    The only thing is that shva-in-gmails-url-what-is-this isn't redundant.. it serves a very specific purpose, nameley SEO. Aug 27, 2010 at 16:49
  • IIRC, the parameter to set when the new UI was still being tested was ui=2.
    – dgw
    Dec 16, 2010 at 1:45
3

Some of them saying it is" should have valid Authentication". We shall consider it OK.

But the real expansion of shva is "security host verification and authentication".

It always comes when you open Gmail.

2
  • 2
    Do you have a source for this? Sounds plausible, just wondering how you know. May 3, 2011 at 15:31
  • Isn't authentication = verification of Identity? Just wondering! May 15, 2012 at 9:10
2

We won't know what it 'exactly' means unless someone inside Google answers your question. But my guess would be that it has to do with security and encryption. Nothing happens when you change it because it is part of the cookie as well. So when you change it they must also compare it with what is set in the cookie.

0

"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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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