EzDevInfo.com

meta-tags

Search Engine Optimization (SEO) plugin for Ruby on Rails applications.

What are the important meta tags I must put in my website? [closed]

There seems to be huge number of meta tags you can set. I'm guessing that some of them are more important than others.

What are the most important metatags to supply and why?

Do I even need meta tags? (looking at the stackoverflow homepage there are none)


Source: (StackOverflow)

How is the meta viewport tag used, and what does it do?

  1. What browsers support this meta tag?
  2. How do i use it?
  3. Does this mean it will solve all my mobile resizing problems?

If anyone could answer this it would be a great help to newbies learning

<meta="viewport">

Source: (StackOverflow)

Advertisements

Is it possible to use jQuery to read meta tags

Is it possible to use jQuery to read meta tags. If so do you know what the basic structure of the code will be, or have links to any tutorials.


Source: (StackOverflow)

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

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.


Source: (StackOverflow)

iPad layout scales up when rotating from portrait to landcape

I have a added to the "viewport" meta tag "width=device-width,initial-scale=1.0" and on an iPad the page loads up fine in landscape mode, the it switches nicely to portrait and when I rotate it back to landscape it scales the page up and I have to pinch zoom it back to a 1 scale.

I can fix this by adding the "maximum-scale=1.0, user-scalable=no", but I was wondering if there is a way I could fix this without taking away from the user the ability to zoom in the page.

If you have any suggestions I would love to hear them,
Thanks!


Source: (StackOverflow)

html5 meta tag cache-control no longer valid?

How do I define

<meta http-equiv="cache-control" content="no-cache" />

in HTML5? It is no longer valid according to the W3C Validator and the documentation.


Source: (StackOverflow)

Should I include a tag?

Suppose I have some sort of proprietary web framework. Should I include a <meta generator="My framework"> tag in the generated files?

I noticed that StackExchange 0.9 applications do that, and wondered what are the pros/cons of doing it. Does it have any effect, or is it just useful for people looking at the source to see?


Source: (StackOverflow)

Force browser to clear cache

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.


Source: (StackOverflow)

Force to open "Save As..." popup open at text link click for pdf in HTML

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 "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 file as below, it just links to file and trying to open the file.

    <a rel='nofollow' href="filename.pdf" title="Filie Name">File name</a>

Appreciate helps! thanks a lot!


UPDATE (according to answers below):

As I see there is no 100% reliable cross-browser solution for this. Probably the best way is using one of the web services listed below, and giving download link...


Source: (StackOverflow)

what is the attribute property="og:title" inside meta tag?

Hi I have this extract of website source code:

<meta content="This is a basic text" property="og:title" />

what does this property attribute stands for??And what is its purpose??


Source: (StackOverflow)

What's the point of 'meta viewport user-scalable=no' in the Google Maps API

I'm using the Google Maps JavaScript API V3 and the official examples always have you include this meta tag:

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

Most of the 3rd-party examples I've seen also do it. I wrote a plugin using it, though, and one of my users told me it's preventing him from being able to zoom in and out on his mobile device. I don't have a mobile device to test with, and none of my searches revealed any helpful information.

So, what's the point of the tag? Should I leave it in? Should I try to detect the browser agent and only show it for desktop browsers?

If you want to examine the plugin, you can download it, browse the source or see a live example.


Source: (StackOverflow)

How to start automatic download of a file in Internet Explorer?

How do I initialize an automatic download of a file in Internet Explorer?

For example, in the download page, I want the download link to appear and a message: "If you download doesn't start automatically .... etc". The download should begin shortly after the page loads.

In Firefox this is easy, you just need to include a meta tag in the header, <meta http-equiv="Refresh" content="n;url"> where n is the number of seconds and url is the download URL. This does not work in Internet Explorer. How do I make this work in Internet Explorer browsers?


Source: (StackOverflow)

Generating Facebook Open Graph meta tags dynamically

As the title implies I'm trying to generate Facebook Open Graph meta tags dynamically, but I can't get it working. Is it even possible?

UPDATE:

Finally I got it working with the help of @saccharine. The following code is working for me:

<?php

$params = array();
if(count($_GET) > 0) {
    $params = $_GET;
} else {
    $params = $_POST;
}
// defaults
if($params['type'] == "") $params['type'] = "restaurant";
if($params['locale'] == "") $params['locale'] = "en_US";
if($params['title'] == "") $params['title'] = "default title";
if($params['image'] == "") $params['image'] = "thumb";
if($params['description'] == "") $params['description'] = "default description";

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# MY_APP_NAME_SPACE: http://ogp.me/ns/fb/MY_APP_NAME_SPACE#">
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

        <!-- Open Graph meta tags -->
        <meta property="fb:app_id" content="MY_APP_ID" />
        <meta property="og:site_name" content="meta site name"/>
        <meta property="og:url" content="http://mysite.com/index.php?type=<?php echo $params['type']; ?>&locale=<?php echo $params['locale']; ?>&title=<?php echo $params['title']; ?>&image=<?php echo $params['image']; ?>&description=<?php echo $params['description']; ?>"/>
        <meta property="og:type" content="MY_APP_NAME_SPACE:<?php echo $params['type']; ?>"/>
        <meta property="og:locale" content="<?php echo $params['locale']; ?>"/>
        <meta property="og:title" content="<?php echo $params['title']; ?>"/>
        <meta property="og:image" content="http://mysite.com/img/<?php echo $params['image']; ?>.png"/>
        <meta property="og:description" content="<?php echo $params['description']; ?>"/>

    </head>
</html>

The url I'm putting into the Facebook debugger now can include any of the dynamic parameters or even none, all or only a selection and in any order like so:
http://mysite.com/index.php?type=restaurant&title=luigis
or this:
http://mysite.com/index.php?locale=de_DE&description=hi&type=bistro

Having that accomplished: I can now publish actions to the user's stream:

function postRestaurant() {
    FB.api('me/MY_APP_NAMESPACE:have_lunch?\
    start_time=2000-12-12T04:00:00&\
    expires_in=7200&\
    restaurant=' + encodeURIComponent(getRedirectURI() + '?type=restaurant' + '&description=arnold' + '&title=stalone'), 'post', function (response) {
        if (!response || response.error) {
            console.log('postRestaurant: Error occured => ' + response.error.message);
        } else {
            console.log('postRestaurant: Post was successful! Action ID: ' + response.id);
        }
    });
}

Works like a charm! : ]


Source: (StackOverflow)

Getting title and meta tags from external website

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_match?

Facebook does something like this but it's properly used by using:

<meta property="og:description" content="Description blabla" />

I want something like this so that it is possible when someone posts a link, it should retrieve the title and the meta tags. If there are no meta tags, then it it ignored or the user can set it themselves (but I'll do that later on myself).


Source: (StackOverflow)

How to stop chrome from caching

I need to force the browser to reload the previous page from the server when the user presses the back button.

I've added the following to my response headers:

Cache-Control: no-cache, must-revalidate
Expires: -1

This seems to work for most browsers but not for Google Chrome that insists on returning the cached results.

So does anyone know how I force the browser to get the page from the server when the user presses the back button?

Thank you.


Source: (StackOverflow)