Mobile app version of vmapp.org
Login or Join
Voss4911412

: Vary Tag For Dynamic Serving Mobile Pages You know; Google suggest us to use Vary Tag at our diynamic content mobile pages. please check the link: https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/dyn

@Voss4911412

Posted in: #GooglebotMobile #Html #MetaTags #Mobile

You know; Google suggest us to use Vary Tag at our diynamic content mobile pages.

please check the link: developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/dynamic-serving
I couldnt understand how to use this tag. Do you have any idea where will i put it?

and how will we calculate Content-Length?

and how to customize this part 'GET /page-1 HTTP/1.1'?

is this a meta-tag(<>)? or just copy paste these lines to all our mobile pages?

HTTP/1.1 200 OK
Content-Type: text/html
Vary: User-Agent
Content-Length: 5710


Could you give an example of usage this Vary Code; in example.php for example.. where wil i put it; before tag; instead of tag?

<html>
HTTP/1.1 200 OK
Content-Type: text/html
Vary: User-Agent
Content-Length: 5710
<body>
</body>
</html> etc..

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Voss4911412

1 Comments

Sorted by latest first Latest Oldest Best

 

@Bryan171

What you're looking for is setting a header value for Vary.

The following PHP example will add a header value for:

Vary: Mozilla/1.22 (compatible; MSIE 5.01; PalmOS 3.0) EudoraWeb 2

<?php
$httpRequest->setHeaders(array('Vary' => 'Mozilla/1.22 (compatible; MSIE 5.01; PalmOS 3.0) EudoraWeb 2'));
?>


You will want to use PHP's $_SERVER['HTTP_USER_AGENT']; to detect the user-agent.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme