meta-tags

What is initial scale, user-scalable, minimum-scale, maximum-scale attribute in meta tag?

a 夏天 提交于 2019-11-26 04:36:31
问题 I was going through the source code of a website and found this piece of code. <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=1.0, minimum-scale=1.0, maximum-scale=1.0\"> I want to know what this initial scale, user-scalable, minimum-scale, maximum-scale are and what does those values mean? And also tell me what all values they accepts. 回答1: They are viewport meta tags, and is most applicable on mobile browsers. width=device-width This means, we are

Angular 4 - Update Meta tags dynamically for Facebook (Open graph)

坚强是说给别人听的谎言 提交于 2019-11-26 04:27:26
问题 How do we add/update meta tags dynamically so that they get picked by Facebook/Whatsapp share dialog? I upgraded my angular 2 application to angular 4 in order to use Meta service to add/update meta tags dynamically once we get the data in component from API. So far in my component, I have this.metaService.updateTag({ property: \'og:title\', content: pageTitle }); this.metaService.updateTag({ property: \'og:url\', \'www.domain.com/page\' }); this.metaService.updateTag({ property: \'og:image\'

How do I get the information from a meta tag with JavaScript?

主宰稳场 提交于 2019-11-26 03:35:25
问题 The information I need is in a meta tag. How can I access the \"content\" data of the meta tag when property=\"video\" ? HTML: <meta property=\"video\" content=\"http://video.com/video33353.mp4\" /> 回答1: You can use this: function getMeta(metaName) { const metas = document.getElementsByTagName('meta'); for (let i = 0; i < metas.length; i++) { if (metas[i].getAttribute('name') === metaName) { return metas[i].getAttribute('content'); } } return ''; } console.log(getMeta('video')); 回答2: The

Getting title and meta tags from external website

半腔热情 提交于 2019-11-26 03:19:44
问题 I want to try figure out how to get the <title>A common title</title> <meta name=\"keywords\" content=\"Keywords blabla\" /> <meta name=\"description\" content=\"This is the description\" /> Even though if it\'s arranged in any order, I\'ve heard of the PHP Simple HTML DOM Parser but I don\'t really want to use it. Is it possible for a solution except using the PHP Simple HTML DOM Parser. preg_match will not be able to do it if it\'s invalid HTML? Can cURL do something like this with preg

Which are the standard W3C meta tags?

被刻印的时光 ゝ 提交于 2019-11-26 02:58:55
问题 What are the list of standard meta tags defined in W3C other than the below given at http://www.w3.org/wiki/HTML/Elements/meta <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <meta http-equiv=\"Content-Style-Type\" content=\"text/css\" /> <meta name=\"copyright\" content=\"© W3C\" /> <meta name=\"author\" lang=\"en\" content=\"\" /> <meta name=\"robots\" content=\"Index,Follow\" /> <meta name=\"description\" content=\"The World Wide Web Consortium (W3C) is an

Provide an image for WhatsApp link sharing

こ雲淡風輕ζ 提交于 2019-11-26 02:35:00
How can we include an image in our website to display in WhatsApp when we share a link like this? 2019 standards It takes a few steps to get the perfect preview for WhatsApp, Twitter, Facebook and bookmark icons for pc's and mobile devices. If you like reading go to ogp.me - but make sure to read steps 1 - 6 in this answer to get the best WhatsApp preview. Step 1: title Maximum of 65 characters <title>your keyword rich title of the website and/or webpage</title> Step 2: description Maximum of 155 characters <meta name="description" content="description of your website/webpage, make sure you

Provide an image for WhatsApp link sharing

烂漫一生 提交于 2019-11-26 00:45:33
问题 How can we include an image in our website to display in WhatsApp when we share a link like this? 回答1: 2019 standards It takes a few steps to get the perfect preview for WhatsApp, Twitter, Facebook and bookmark icons for pc's and mobile devices. If you like reading go to ogp.me - but make sure to read steps 1 - 6 in this answer to get the best WhatsApp preview. Please note: some apps or websites use cache or even store the website preview to their database. This means when you're testing your

Is it possible to use JavaScript to change the meta-tags of the page?

荒凉一梦 提交于 2019-11-25 23:46:03
问题 If I put a div in the head and display:none, than use JavaScript to display it, will this work? Edit: I have stuff loaded in AJAX. And as my AJAX changes the \"main\" portion of the site, I want to change the meta-tags as well. 回答1: Yes, you can do that. There are some interesting use cases: Some browsers and plugins parse meta elements and change their behavior for different values. Examples Skype: Switch off phone number parser <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER

Force to open “Save As…” popup open at text link click for PDF in HTML

风流意气都作罢 提交于 2019-11-25 23:34:33
问题 I have some big size PDF catalogs at my website, and I need to link these as download. When I googled, I found such a thing noted below. It should open the \" Save As... \" popup at link click... <head> <meta name=\"content-disposition\" content=\"inline; filename=filename.pdf\"> ... But it doesn\'t work :/ When I link to a file as below, it just links to file and is trying to open the file. <a href=\"filename.pdf\" title=\"Filie Name\">File name</a> UPDATE (according to answers below): As I

Force browser to clear cache

时光总嘲笑我的痴心妄想 提交于 2019-11-25 23:04:48
问题 Is there a way I can put some code on my page so when someone visits a site, it clears the browser cache, so they can view the changes? Languages used: ASP.NET, VB.NET, and of course HTML, CSS, and jQuery. 回答1: If this is about .css and .js changes, one way is to to "cache busting" is by appending something like " _versionNo " to the file name for each release. For example: script_1.0.css // This is the URL for release 1.0 script_1.1.css // This is the URL for release 1.1 script_1.2.css //