: 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
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..
More posts by @Voss4911412
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.