amp-html

Google AMP: amp-list vs php loop - SEO / Pagespeed

本小妞迷上赌 提交于 2020-01-05 06:26:23
问题 My AMP page serves a list of reviews. Each review is an amp-accordion in order to implement nice read-more features. I am currently in debate whether or not to load the reviews straight into the DOM (php loop) or load them through a JSON file (amp-list). When I compare the two versions of this page, amp-list wins big in DOMContentLoaded and Load, but they are tied in Finish with a small favor towards the php loop version. Assuming the php loop version would be completely AMP-Cached, and amp

How to detect devices (Android, iOS, windows) in AMP website

我只是一个虾纸丫 提交于 2020-01-05 04:04:10
问题 I have made a website in AMP (Accelerated Mobile Pages). I want to show some content in android but not in iOS. Is there any way to detect android and iOS using AMP? 回答1: You can use amp-access for this, You have to identify user-agent in authorization and set a flag. here is an example which does that. In the example device-detection checks if the device is android otherwise returns Iphone 来源: https://stackoverflow.com/questions/54039020/how-to-detect-devices-android-ios-windows-in-amp

Update Google AMP cache URL signature verification error

[亡魂溺海] 提交于 2020-01-04 05:48:18
问题 I'm trying to update my Google AMP pages in the Google AMP Cache, but get an URL signature verification error. My code: Dim tStamp As String = GetUnixTimeStampFromDateTime(DateTime.Now).ToString Dim ampBaseUrl As String = "https://www-example-com.cdn.ampproject.org" Dim signatureUrl As String = "/update-cache/c/s/www.example.com/articles/278/myarticle/amp?amp_action=flush&amp_ts=" + tStamp Dim rsa As RSA = certificate.GetRSAPrivateKey() Dim data() As Byte = System.Text.Encoding.Unicode

Is it possible to enable by default the sound in amp-story?

你说的曾经没有我的故事 提交于 2020-01-04 04:08:06
问题 didn't find a way to enable by default the sound in an AMP Story. Is it possible ? Thanks 回答1: No, it is not possible to enable audio by default. Browsers often explicitly blacklist this behavior and only allow audio to be enabled after a user gesture, e.g: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/ The global muted state of an amp-story starts off muted; users must always unmute the story for

How to check Amp is enabled for a website with Php

那年仲夏 提交于 2020-01-01 19:50:08
问题 Is there a general way to check if AMP is enabled for an URL? I currently use Curl to get HTML. What should I do after? $html; if(AMP is Enabled) echo "You are using AMP in Mobile Version"; else echo "You are not using AMP in Mobile Version"; 回答1: Yes you can do like this Non AMP page contain <link rel="amphtml" href="https://www.example.com/url/to/amp/document.html"> Assuming that you have the content in $html; PHP CODE $dom = new DOMDocument(); @$dom->loadHTML($html); $nodes = $dom-

Embed Map with Marker on AMP HTML page

核能气质少年 提交于 2020-01-01 08:39:53
问题 Currently I use the Google Maps API to generate a map with a marker (given a lat/long set of coordinates) to a given location. In AMP HTML, it appears the way to do this currently is using the amp-iframe extension https://github.com/ampproject/amphtml/tree/master/extensions. The issue is you cannot use Google Maps embed code with coordinates unless you are using a 'view' map. I don't have a Place ID, so I cannot use the Place mode. I can't use 'View' mode, since that has no markers. I've

Using /update-cache requests to update AMP pages

拈花ヽ惹草 提交于 2019-12-30 10:56:12
问题 Trying to use /update-cache/ requests to update some AMP pages, but i'm getting 403 errors. Removed the opening part/protocol from the urls since i don't have the reputation to post this many links, but everything is https. I have a page at: www.qponverzum.hu/ajanlat/budapest-elozd-meg-a-hajhullast-mikrokameras-hajdiagnosztika-hajhagyma-es-fejborvizsgalattal-tanacsadas-5000-ft-helyett-2500-ft-ert-biohajklinika-szepsegapolas-egeszseg/amp From the AMP cache: www-qponverzum-hu.cdn.ampproject.org

Images are not visible on AMP pages

时光总嘲笑我的痴心妄想 提交于 2019-12-25 19:57:33
问题 I have implemented AMP on my home page, but some images are not visible. You can check on our website : https://www.hopohomes.com/ 回答1: I think u misunderstood about AMP concept.AMP-HTML tags are not the HTML tags replacement. You cant just convert your site into an AMP just by replacing few tags. your site must follow amp html specification(https://www.ampproject.org/docs/reference/spec). To test that, you can install amp validator chrome extension or by ending your site url by /#development

How to insert facebook audience network ad on AMP page?

橙三吉。 提交于 2019-12-25 19:08:08
问题 AMP pages doesn't allow javascript and the <amp-ad> tag does not support Facebook Audience network, what can I do to insert a facebook audience network ad? 回答1: You can ask (open a issue) on Githib to support Facebook Audience network, but i am not familar with this. Maybe the network self must ask for support. 来源: https://stackoverflow.com/questions/38077536/how-to-insert-facebook-audience-network-ad-on-amp-page

AMP for complex page

a 夏天 提交于 2019-12-25 04:58:07
问题 I have existing articles website with complex UI like commenting system and voting system. If I create Google AMP page, do I need to include all complex UI (voting,commenting system) as well? If I do not include that in Google AMP, aren't visitors only able to view the article but cannot interact with features that my website have? Aren't this too much work to re-create another amp-version of pages on-top of existing pages? 回答1: It depends how complex your website is, but what you will