meta-tags

OpenGraph meta for facebook, linkedin and twitter

…衆ロ難τιáo~ 提交于 2019-12-04 18:56:30
I'm trying to make sure that when my website is shared the correct meta information is displayed. I thought I had it working but I'm experiencing a few issues on different social websites, as follows: Twitter pulls in the text but doesn't display the specified image. LinkedIn displays text but seems to use the wrong image so it's stretched. Facebook doesn't display anything. If I post the URL, that's all that's displayed as a hyperlink. Originally I just had the meta name="twitter: stuff but have since added the meta property="og: above it as I was told that was needed for LinkedIn. This is

“apple-mobile-web-app-title” on Android

做~自己de王妃 提交于 2019-12-04 17:54:30
问题 is there an equivalent to iOS 6 meta tag apple-mobile-web-app-title for android web-applications? Something that gives you the possibility to define a long title and a short title. <title>Long name</title> <meta name="apple-mobile-web-app-title" content="Short name"> 回答1: This is possible using the "application-name" meta tag. However it only appears to work with chrome. Firefox and the android browser don't use the title tag <head> ... <meta name="application-name" content="Awesome App!"> ..

Precedence of X-Robots-Tag header vs robots meta tag

做~自己de王妃 提交于 2019-12-04 17:50:59
问题 I've placed the following Header in my vhost config: Header set X-Robots-Tag "noindex, nofollow" The goal here is to just disable search engines from indexing my testing environment. The site is Wordpress and there is a plugin installed to manage per-page the meta robots settings. For example: <meta name="robots" content="index, follow" /> So my question is, which directive will take precedence over the other since both are being set on every page? 回答1: I am not sure if a definitive answer

Custom fields for Shopify User Registration Form

扶醉桌前 提交于 2019-12-04 13:48:02
I can't find any documentation on how to add custom fields for the user registration forum so I tried something but didn't work: <div class="single-full-width customer"> <div class="login"> {% form 'create_customer' %} {% if form.errors %} {% for field in form.errors %} <p class="input-error-wrapper"><span>{{field}} {{ form.errors.messages[field] }}</span></p> {% endfor %} {% endif %} <p> <label>First Name:</label> <input type="text" value="" name="customer[first_name]" class="input-text-1" /> </p> <p> <label>Last Name:</label> <input type="text" value="" name="customer[last_name]" class=

Is there a meta tag or something for desktops that works like viewport initial-scale?

家住魔仙堡 提交于 2019-12-04 13:05:01
问题 I know you're thinking that this is a strange request, however I am currently dealing with a client that gave me a template and decided he wanted it 70% smaller after seeing it in a browser and all the HTML done ( !!!! ). Thus throwing all the work that was done for both of us out the window. If I could adjust the scale to 0.7 (70%) that would be perfect and the project can still roll out the way it was going. Thank you! 回答1: body { zoom: 0.7; transform: scale(0.7); transform-origin:0 0; -ms

Placing Facebook Metatags in Rails Application

你。 提交于 2019-12-04 12:51:50
I have implemented Omniauth and Koala7 gems to integrate my application with Facebook. Everything works well, except one minor problem with posting custom actions with custom objects. The problem is that my object url should be the show page of a newly created post, such as /posts/1. To make this page recognized as a facebook object, I need to put facebook metatags on top of the show.html.erb like this: <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# sdff: http://ogp.me/ns/fb/sdff#"> <meta property="fb:app_id" content="myid" /> <meta property="og:type" content="sdff:post" /> <meta

How to handle meta elements not validating in HTML5?

我与影子孤独终老i 提交于 2019-12-04 12:34:17
问题 In HTML5, some meta elements do not validate (yet?) like: <meta http-equiv="x-ua-compatible" content="ie=emulateie7;chrome=1"> <meta http-equiv="imagetoolbar" content="no"> Are Conditional Comments an appropriate solution here resp. will meta elements still work as expected? <!--[if IE]><meta http-equiv="x-ua-compatible" content="ie=emulateie7;chrome=1"><![endif]--> <!--[if lt IE 7]><meta http-equiv="imagetoolbar" content="no"><![endif]--> Using a .htaccess file instead of meta elements (not

Is it a good practice to store the csrf token in meta tag?

旧街凉风 提交于 2019-12-04 11:39:19
问题 If I make a POST request without using form and want to prevent CSRF attack, what I can do is to set the csrf-token in meta tag and put it back to the header when the request is triggered. Is it a good practice? <meta name="csrf-token" content="xxx"> Put the token back via the header, using JQuery for example: $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); 回答1: Yes this is good practice. If you are using ajax I think this is the cleanest solution.

Can I declare two different charsets on one HTML page using a meta tag?

放肆的年华 提交于 2019-12-04 10:13:48
Is possible to specify two different character sets on a page using meta tags, like: <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> I tried to add both of them and doesn't work :P Thanks No, it's not possible. What would be the point of adding two different charset declarations? You should add only one declaration that matches your content. Paul D. Waite A "character set" is better referred to in this context as a "text encoding". Text is stored by computers as numbers. For a given piece of stored

Validation error: “The itemprop attribute was specified, but the element is not a property of any item”

南楼画角 提交于 2019-12-04 08:56:08
问题 For better SEO I need put some meta on my page like this: <!-- Schema.org markup for Google+ --> <meta itemprop="name" content="The Name or Title Here"> <meta itemprop="description" content="This is the page description"> <meta itemprop="image" content="http://www.example.com/image.jpg"> Here is the source. Then I check this code on Markup Validation Service: <!DOCTYPE html> <html> <head lang="en"> <meta itemprop="name" content="The Name or Title Here"> <meta itemprop="description" content=