Rectangle 27 116

wget -nd -r -l 2 -A jpg,jpeg,png,gif http://t.co
  • -nd: no directories (save all files to the current directory; -P directory changes the target directory)
-r -l 2
-A
wget -nd -H -p -A jpg,jpeg,png,gif -e robots=off example.tumblr.com/page/{1..2}
-H
  • -p: page requisites (includes resources like images on each page)
  • -e robots=off: execute command robotos=off as if it was part of .wgetrc file. This turns off the robot exclusion which means you ignore robots.txt and the robot meta tags (you should know the implications this comes with, take care).
.jpg
$ wget -nd -r -l 1 -A jpg http://example.com/listing/
-H -p

How do I use Wget to download all Images into a single Folder - Stack ...

wget
Rectangle 27 347

1. Set the format-detection meta tag.

To remove all auto-formatting for telephone numbers, add this to the head of your html document:

<meta name="format-detection" content="telephone=no">

Note: If you have phone numbers on the page with these numbers you should manually format them as links:

<a href="tel:+1-555-555-5555">1-555-555-5555</a>

When you can't set a meta tagsuch as in html emailwrap phone numbers in link/anchor tags (<a href=""></a>) and then target their styles using css similar to the following and adjust the specific properties you need to reset:

a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

If you want to target specific links, use classes on your links and then update the css selector above to a[x-apple-data-detectors].class-name.

Alternatively, you can target links with href values starting with tel by using this css selector:

a[href^="tel"] {
  /* css propery: value pairs here */
}

Hi Beausmith, thanks for your answer. Ended up using your first solution in the end a while ago...just wondered if there another solution to the problem.

@Beau Smith, that worked for me too, but not on iPod 1st Generation's Safari. Is there any specific tag for that old browser?

45 answers and still haven't made that the solution? :)

This is the answer. Had a contact page that the numbers wouldn't show up on iPads and iPhones. This did the trick, thank you!

RE using 'tel:' links to markup phone numbers: it has also been suggested to use microformats as an alternative (ux.stackexchange.com/a/21121/36009).

html - How do I remove the blue styling of telephone numbers on iPhone...

html ios css mobile-safari
Rectangle 27 346

1. Set the format-detection meta tag.

To remove all auto-formatting for telephone numbers, add this to the head of your html document:

<meta name="format-detection" content="telephone=no">

Note: If you have phone numbers on the page with these numbers you should manually format them as links:

<a href="tel:+1-555-555-5555">1-555-555-5555</a>

When you can't set a meta tagsuch as in html emailwrap phone numbers in link/anchor tags (<a href=""></a>) and then target their styles using css similar to the following and adjust the specific properties you need to reset:

a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

If you want to target specific links, use classes on your links and then update the css selector above to a[x-apple-data-detectors].class-name.

Alternatively, you can target links with href values starting with tel by using this css selector:

a[href^="tel"] {
  /* css propery: value pairs here */
}

Hi Beausmith, thanks for your answer. Ended up using your first solution in the end a while ago...just wondered if there another solution to the problem.

@Beau Smith, that worked for me too, but not on iPod 1st Generation's Safari. Is there any specific tag for that old browser?

45 answers and still haven't made that the solution? :)

This is the answer. Had a contact page that the numbers wouldn't show up on iPads and iPhones. This did the trick, thank you!

RE using 'tel:' links to markup phone numbers: it has also been suggested to use microformats as an alternative (ux.stackexchange.com/a/21121/36009).

html - How do I remove the blue styling of telephone numbers on iPhone...

html ios css mobile-safari
Rectangle 27 3

cache:http://stackoverflow.com/questions/4560400/how-can-i-get-the-google-cache-age-of-any-url-or-web-page

this will show you the last webcache of the page.see here:

But remember, the caching of a webpage will only show if the page is already indexed on search engine(Google). for this you need to check the meta robot tag of that page.

html - How can I get the Google cache age of any URL or web page? - St...

html url hyperlink web-scraping
Rectangle 27 84

Unfortunately each browser has it's own implementation of the viewport meta tag. Different combinations will work on different browsers.

Android 2.3.x/3.x: By setting user-scalable=no you disable the scaling of the viewport meta tag yourself as well. This is probably why your width option is having no effect. To allow the browser to scale your content, you need to set user-scalable=yes, then to disable zoom you can set the min and max scale to the same value so it cannot shrink or grow. Toy with the initial scale until your site fits snugly.

Android 4.x: Same rule apply as 2.3.x except the min and max scales are not honored anymore and if you use user-scalable=yes the user can always zoom, setting it to 'no' means your own scale is ignored, this is the issue I'm facing now that drew me to this question... You cannot seem to disable zoom and scale at the same time in 4.x.

iOS/Safari (4.x/5.x tested): Scales work as expected, you can disable scaling with user-scalable=0 (keywords yes/no don't work in 4.x). iOS/Safari also has no concept of target-densitydpi so you should leave that out to avoid errors. You don't need min and max since you can switch off zooming in the expected manner. Only use width or you'll run into the iOS orientation bug

Chrome: Scales work as expected like they do in iOS, min and max are honored and you can switch off zooming by using user-scalable=no.

Conclusion: You can use some fairly simple JS to set the content accordingly after some basic browser/device detection. I know this type of detection is frowned upon but in this case it's almost unavoidable because each vendor has gone and done their own thing! Hope this helps people fighting the viewport, and if anyone has a solution for disabling zooming in Android 4.x WITHOUT the use of the viewport, please let me know.

Android 4.x Chrome browser (which I think is pre-installed in most countries): You can make sure the user cannot zoom and the page is fullscreen. The downside: you have to make sure the content has a fixed width. I haven't tested this on lower Android versions. To do this see the example:

iOS/Safari 7.1: Since v7.1, Apple have introduced a new flag for the viewport meta tag called minimal-ui. To assist with full screen apps, this hides the address bar and bottom toolbar for a full-screen experience (not quite Full Screen API but close and doesn't require user acceptance). It does comes with it's fair share of bugs as well and doesn't work in iPads.

<meta name="viewport" content="initial-scale=1.0,width=device-width,user-scalable=0, minimal-ui" />

iOS/Safari 8 Beta 4: The viewport meta tag minimal-ui mentioned in EDIT 2 has now been removed by Apple in this release. Source - WebKit Notes

Thanks for the useful article. I was struggling with chrome on android. For the Android 4.x stock browser, we work around the mentioned issue by setting a viewport width in pixels. Suppose you want a fixed scale of 1.3, the viewport witdh should be Math.floor((screen.availWidth * 10) / 13). We put that number in a cookie, then force a reload to allow server side code to set the correct meta tag.

android - Full webpage and disabled zoom viewport meta tag for all mob...

android iphone ipad viewport meta
Rectangle 27 34

So you want to change the viewport tag's width dynamicaly .

Here you go :

<meta id="myViewport" name="viewport" content="width = 380">
<script>
window.onload = function () {
    var mvp = document.getElementById('myViewport');
    mvp.setAttribute('content','width=580');
}
</script>

This worked perfectly: <script>if (window.innerWidth < 450) { /* put content of function above here*/}</script>. The page here gives more details, and the page here is a brilliant explanation of viewports. Thanks to everyone for all the help and pointing me in the right direction.

How is this solving the problem? Setting the viewport-width to a fixed size is not interpreted as minimum size! f.e. on iPad doesn't give the site more space. Further the suggested code in the answer is not complete.

@Andy No one provide complete project code. Pseudo code is enough for programmers to grab the concept. If you want, let me know. I'l give you the full code.

@ss this is not pseudo-code, it's JavaScript code. And it's just incomplete, therefore not a solution

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

html - Achieving min-width with viewport meta tag - Stack Overflow

html gwt media-queries meta
Rectangle 27 80

og:title is one of the open graph meta tags. og:... properties define objects in a social graph. They are used for example by Facebook.

og:title stands for the title of your object as it should appear within the graph (see here for more http://ogp.me/ )

Is it still necessary to use og, because if I want to improve my google page rankings, I remember reading that page related information should be within first 200-250 characters of the page. If I include og:title, og:description and some other fields how will my page ranking get affected?

html - What is the attribute property="og:title" inside meta tag? - St...

html facebook properties meta-tags
Rectangle 27 23

$('meta[name=og\\:url]').attr('content', newVideoUrl);

note the double backslash, without it Jquery will fail with an error.

So mark it as accepted

@jinn When i try your markup it indeed changes the html. But Facebook still picks my old content value. I don't think Facebook takes javascript into account. Can you verify wheter Facebook actually shows the proper content which you applied via jQuery?

Should, in fact, be 'property' and NOT 'name'.

Changing Facebook meta tag Content Attribute using JQuery - Stack Over...

jquery facebook facebook-like meta-tags
Rectangle 27 12

You can do this, not the cleanest, but what you're trying to do is pretty odd so there's not a great way to handle it:

var mt = $('meta[name=some-name]');
mt = mt.length ? mt : $('<meta name="some-name" />').appendTo('head');
mt.attr('content', 'some value');

The conditional expression in there checks .length, which is 0 or false if not found, if that's the case we create the element and append it to the head, whether it was added or originally found, mt is set to the <meta> with that name now, and you can set the attribute.

Thanks for the code Nick. What I'm doing may seem strange, but its a 100% client-side app and so as the user does things, the value of the Meta tags need to change to reflect the present state.

@Andresch - nope, we're setting the content="some value" attribute of the <meta> tag, it's a specific attribute of that element...you can read more about it here: w3.org/TR/html4/struct/global.html#h-7.4.4.2

Having trouble using jQuery to set meta tag values - Stack Overflow

jquery meta-tags
Rectangle 27 327

<!-- For Google -->
<meta name="description" content="" />
<meta name="keywords" content="" />

<meta name="author" content="" />
<meta name="copyright" content="" />
<meta name="application-name" content="" />

<!-- For Facebook -->
<meta property="og:title" content="" />
<meta property="og:type" content="article" />
<meta property="og:image" content="" />
<meta property="og:url" content="" />
<meta property="og:description" content="" />

<!-- For Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="" />
<meta name="twitter:description" content="" />
<meta name="twitter:image" content="" />

Fill the content =" ... " according to the content of your page.

Do you know if the author tag should have the author name, or a link to a profile URL?

I think both is possible. If you want your profile image at the left side of your post at the google search page, you should provide the link to your google+ profile.

meta tag author means author of website or author of current article( example in usage on blog article )?

Is this a good execution? Will Google/Facebook/Twitter find no errors with this?

1) Facebook will read the <meta name="author"> tag and display it in the preview when someone shares a page 2) Facebook now has support for <meta property="article:author"> (details at giannopoulos.net/2015/06/20/) and will display a link to your Facebook profile (if you actually put a link to it in article:author) 3) Google now looks for rich data in the form of what it calls "Rich Snippets" (developers.google.com/structured-data)

How to use the 'og' (Open Graph) meta tag for Facebook share - Stack O...

facebook-opengraph meta
Rectangle 27 13

The property in meta tags allows you to specify values to property fields which come from a property library. The property library (RDFa format) is specified in the head tag.

For example, to use that code you would have to have something like this in your <head tag. <head xmlns:og="http://example.org/"> and inside the http://example.org/ there would be a specification for title (og:title).

The tag from your example was almost definitely from the Open Graph Protocol, the purpose is to specify structured information about your website for the use of Facebook (and possibly other search engines).

I like the way you went into detail to explain the namespacing. Is it true, though, that the specification for title appears at the 'example.org/'; address? I was under the impression that the value of the 'xmlns:og' merely had to uniquely identify the namespace, rather than point to it's actual specification. It's a fine point but I thought I'd mention it. I may be wrong.

I think JW is right on what 'xmlns:og' is for.

html - What is the attribute property="og:title" inside meta tag? - St...

html facebook properties meta-tags
Rectangle 27 38

You have to add a CSP meta tag in the head section of your app's index.html

On Android and iOS, the network request whitelist (see above) is not able to filter all types of requests (e.g. <video> & WebSockets are not blocked). So, in addition to the whitelist, you should use a Content Security Policy <meta> tag on all of your pages.

On Android, support for CSP within the system webview starts with KitKat (but is available on all versions using Crosswalk WebView).

.html
<!-- Good default declaration:
    * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
    * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
    * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
        * Enable inline JS: add 'unsafe-inline' to default-src
        * Enable eval(): add 'unsafe-eval' to default-src
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">

<!-- Allow requests to foo.com -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">

<!-- Enable all requests, inline styles, and eval() -->
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

<!-- Allow XHRs via https only -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">

<!-- Allow iframe to https://cordova.apache.org/ -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org">

When I add the CSP Decleration, the following piece of code for google map fails like this. Any idea ? var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); //line 173 11-09 21:17:30.724: D/SystemWebChromeClient(25692): file:///android_asset/www/index.html: Line 173 : Uncaught ReferenceError: google is not defined

That's what the OP already did, isn't it?...

cordova - "No Content-Security-Policy meta tag found." error in my pho...

cordova phonegap-plugins whitelist
Rectangle 27 23

There are errors in your meta tag.

Note the colon after "script-src", and the end double-quote of the meta tag.

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"/>

@codePlusPlus to activate Ionic livereload again, add http://localhost:35729 to the script-scr directive and ws://localhost:35729 to the connect-src directive.

@kolli, can you show what the new diretives would look like? it's not clear how to add them to the directives.

script-src 'self' 'unsafe-inline' 'unsafe-eval'
script-src 'self' http://localhost:35279 'unsafe-inline'  'unsafe-eval'
; script-src ws://localhost:35279

Correction to above... for the second part, it should be ; connect-src 'self' ws://localhost:35279 . Note that I was getting an error (could not access file://<path to index.html> due to CSP violation) until I added 'self'.

cordova - "No Content-Security-Policy meta tag found." error in my pho...

cordova phonegap-plugins whitelist
Rectangle 27 11

You could set X-UA-Compatible as a HTTP response header, instead of as a meta tag.

This is a much cleaner solution than placing it above the <html> tag.

A confusing useful blog post concerning X-UA-Compatible and its many intricacies:

html - IE8 standards mode meta tag - Stack Overflow

html internet-explorer-8 doctype
Rectangle 27 14

It is definitely possible to change meta tags using jQuery, but I don't think that's going to accomplish what you want since the meta tags are pulled by the FB scraper. The FB scraper goes out and scrapes your page to read the meta tags.

You can update the attributes of your page by updating your page's tags. Note that og:title and og:type are only editable initially - after your page receives 50 likes the title becomes fixed, and after your page receives 10,000 likes the type becomes fixed. These properties are fixed to avoid surprising users who have liked the page already. Changing the title or type tags after these limits are reached does nothing, your page retains the original title and type.

For the changes to be reflected on Facebook, you must force your page to be scraped. The page is scraped when an admin for the page clicks the Like button or when the URL is entered into the Facebook URL Linter. You can programmatically force your page to be scraped by cURL'ing the linter. For example ...

Just wondering about using javascript to set these properties. That would require the scraper to execute javascript on the page before it reads the properties. Is that very likely?

When i check Facebook or their debugger tool they appear to indeed not use Javascript.

Changing Facebook meta tag Content Attribute using JQuery - Stack Over...

jquery facebook facebook-like meta-tags
Rectangle 27 13

To prevent CSRF you need a value that is submitted with the request that cannot be sent by a malicious site. Authentication cookies are not suitable because if an attacker can make the browser send a request to the victim site, the cookies will automatically be submitted.

For example, by submitting a form via JavaScript contained on www.evil.com to attack the user's session on www.example.com:

<form method="post" action="https://www.example.com/executeAction">
    <input type="hidden" name="action" value="deleteAllUsers">
</form>

<script>document.forms[0].submit()</script>

Storing an anti CRSF token within the page is the OWASP recommended solution for preventing another website from submitting the form, as the random token in the user's session cannot be read by www.evil.com due to the Same Origin Policy preventing JavaScript on www.evil.com reading the page content of www.example.com.

These tokens can be stored anywhere within the page. Most commonly it will be within hidden form fields, but they could also be stored within HTML 5 data- attributes. It seems like using meta tags is simply another way it can be stored where the JavaScript can include it in any form submissions the page makes.

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

security - Why CSRF token should be in meta tag and in cookie? - Stack...

security cookies web csrf meta-tags
Rectangle 27 10

So using Javascript to modify the metatags in order to show different share content won't work.

You'd need to use serverside code to write them out as needed in the HTML source.

Yeah - I don't see it changing any time soon either.

Changing Facebook meta tag Content Attribute using JQuery - Stack Over...

jquery facebook facebook-like meta-tags
Rectangle 27 5

use a @media tag and css. It works wonders. Although it does not supply a minimal width to the view port, this is the preferred way to go.

Here is what I do for the viewport:

<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=yes, minimum-scale=1.0, maximum-scale=2.0">

Then I adjust the size for the panel attached to the viewPort:

@media all and (max-width: 1024px) {
    /*styles for narrow desktop browsers and iPad landscape */
       .myContentPanel{
         width: 450;
    }    
}


@media all and (max-width: 320px) {
   /*styles for iPhone/Android portrait*/
      .myContentPanel {
         width: 320;
    }

}

Obviously you can have intermediate sizes too...

hi, thanks for the quick reply. I understand that media queries can be used to alter CSS and change the size of the content div. I just don't really understand how this affects the viewport? i.e. I've tried what you suggested (and removed the viewport meta tag), but when I look at it on my phone (Android) it just makes the content smaller, with lots of empty space around it.

Hi Tom, see the revised answer. It was late last night ... anyway ... I use CSS to set the size of the panel on the viewport (not the viewport itself which is set to screen size). So for smaller screens, the panel will scroll to show the content if it doesn't fit. It works nicely when rotating the screen too.

the javascript approach in the accepted answer is what I was looking for (changes the viewport rather than the layout). Thanks though, I didn't know about media queries before.

html - Achieving min-width with viewport meta tag - Stack Overflow

html gwt media-queries meta
Rectangle 27 9

CSRF tokens normally go in a form as hidden form fields. Putting them in a meta tag only makes sense if you are using JavaScript. JavaScript could read the tokens from the meta tag and post them to an action.

You wouldn't want to put a CSRF token in a cookie because the cookie will be sent for every request to the specific website from the web browser regardless of its origin. The only exception would be secure cookies, which are supposed to follow the same-origin policy.

security - Why CSRF token should be in meta tag and in cookie? - Stack...

security cookies web csrf meta-tags