iPhone/iPad WebApps don't allow cookies? - iphone

When I use <meta name="apple-mobile-web-app-capable" content="yes">, my page doesn't set, load, or retrieve cookies. Is there any way to get around this? I can't find anything useful in Google.

UIWebviews don't store cookies. Use HTML5 local storage instead.

There is a small bug in the comment on the first line of jquery.cookie.js that iPads don't like.
Change /*! to /* on line 1.

Related

How to get larger favicon from Google's api?

Is it possible to get a larger version of the favicon from the Google's api or from somewhere else?
This is the url.
http://www.google.com/s2/favicons?domain=google.com
I searched for an alternative api on ProgrammableWeb and Google but many of them don't exist anymore and the one I found that actually seems to work isn't free. (http://grabicon.com/)
I need the icon for a VB.NET project that has a list of websites with icons. But 16x16 icons are too small for that.
looks like there is size parameter in google now.
https://www.google.com/s2/favicons?sz=64&domain_url=yahoo.com
Editted:
The below answer is no longer valid, but the code is freely available on github:
Github -> Favicons for all!
Original answer
You can also try Statvoo's Favicon API, e.g.
https://api.statvoo.com/favicon/?url=google.com
https://api.statvoo.com/favicon/?url=stackoverflow.com
etc..
They also have quite a few other API's you can use if you look around. Most of which are free and have been around for years.
Looks like Google has an size attribute too.
https://www.google.com/s2/favicons?sz=64&domain_url=https://stackoverflow.com/
Here's some Favicon Fetchers I have found
Free Favicon-Service by AllesEDV.at - https://f1.allesedv.com/stackoverflow.com
Google Favicon Snatcher - https://www.google.com/s2/favicons?domain=stackoverflow.com
Favicon Grabber - http://favicongrabber.com/api/grab/stackoverflow.com
For Favicon Grabber it will return as JSON list of icon URLs.
Alternatively you can load the main page of the site and figure it out from there: https://stackoverflow.com/a/1990487/
According to https://news.ycombinator.com/item?id=17190599:
Unless that endpoint can also return other resolutions, Favicon Kit
offers more: https://api.faviconkit.com/twitter.com/144
https://api.faviconkit.com/twitter.com/16
(Though, I will say, the URIs returned for Twitter and the image sizes
don't actually align in those cases. The first is actually 192ˣ192
pixels, and the second is 32ˣ32 pixels. That seems odd. Maybe they
should have endpoints like domain/large, domain/medium, domain/small?)
Favicons are specified either as part of the HTML page, the HTTP response to a request for a page, or simply by being hosted at a default location.
That's true for all sites. There's plenty of browser extensions that can help you figure out the favicons a page send, if you don't manage by hand. For example, right clicking in firefox, "Page Info", "Media", "sort by type"->"Icon" should show all icons that a browser can find. It's not usual to have Icons larger than 32x32, and google might not be an exception.
Also be aware that the .ico format can contain multiple Icon sizes that not all tools show. So saving that .ico on your computer and inspecting it with a tool known to deal with all sizes contained in a single file might help.
Last word of advice: You're dealing with the logo, the very core of their brand, of a multi-billion dollar company. You might want to check with their policy of using that logo in your project. Probably it's OK (for example, browser don't seem to get in trouble for having a google logo for their google search box), but I'd still take care not to raise the impression that you're association a product of your own making with their logo.

Web page rendering incorrectly on mobile Safari and mobile Chrome

I wanted to see if anyone else had ever had an issue with Mobile Safari or Chrome causing web pages to suddenly spit out a ton of garbage.
The issue occurs when I visit the site & refresh multiple times. Suddenly, none of the content renders correctly, but instead looks more like the type of glyphs you'd see in Microsoft Word.
Has anyone ever seen this before and, if so, how did you resolve the problem?
I have seen it on iPhone and Android. On iPhone I suspect its due to the interruption during the page load (getting kCFURLErrorCancelled on the didFailLoadWithError method). Though I am still looking to confirm this issue and still looking for a solution ...
You should check the character set of the HTML page. Bases on your language or the special characters used in the page, you should use the apt charset. You can learn more about charsets here
http://www.w3schools.com/tags/ref_charactersets.asp
http://en.wikipedia.org/wiki/Character_encodings_in_HTML
http://en.wikipedia.org/wiki/UTF-8
It is really difficult to tell anything from what you have posted. You should check the meta tags of your page. I would suggest you validate the html source and css of the page here .

Float number is displayed as phone number for Opera-mobile

I'm developing small web-mobile application. Some my page contains float number. But on Opera-mobile this number is displayed as link to deal phone number. I have found similar issue for Safari:
<meta name="format-detection" content="telephone=no"/>
But this doesn't works for Opera-mobile. How to to fix it?
Although likely not the best solution you can use javascript to find the <a href="tel..." blocks and remove the href attribute from there.

Can I wrap Adsense code in PHP to omit adsense from specific webpages?

I am using an instance of mediawiki and have added adsense to the php file of the skin. This places the adsense banner on all pages but I would like to omit the adsense banner from very specific pages.Primarily the "homepage" (but keep adsense on all the other pages). My site is really big so going in the other direction (adding adsense to specific pages) would be a huge pain.
I was hoping there was a bit of PHP code I could wrap the adsense code in that would allow me to specify URLS for the adsense to ignore.
Thank you.
I'm not a programmer so I have no idea what you just said.
However, This article answered my question:
http://forum.dreamhosters.com/3rdparty/29149-MediaWiki-and-Google-AdSense.htm
I just added the "Main Page" (homepage) to the list of omitted pages in the list.
Example:
!strstr($_SERVER['REQUEST_URI'], "Main_Page") &&
THanks anyway.
Make an array of the pages to omit, then check the server environment variable REQUEST_URI to see if it's in the array?
If strstr works OK for you, fine. The way I mentioned would probably be coded:
!(in_array($_SERVER['REQUEST_URI'], array("/Main_page", "/some/other/page", "/no_ads.html")) &&
I rarely use PHP any more, otherwise I would have provided code at the time. I just get onto stackoverflow when I run into snags in my own coding, and try to offer hints when I can. Sometimes they help, sometimes they don't.
You can just use the AdSense extension and hide the ads on specific pages with custom CSS.
Or you can use a specific AdSense extension which already hides the ads where you want, namely the main page.

prevent google from indexing

hi sirs what's the best way to prevent google from showing of a folder in the search engine ?, like e.g www.example.com/support , what should i do if I want the support folder to disappear in google ?
the first thing I did was place a 'robots.txt' file and include this code
User-agent: *
Disallow: /support/etc
but the results is a total disaster, am not able to use the support page anymore unless i remove the robots.txt
what's the best thing to do ?
robots.txt shouldnt affect the way your page function. If in doubt, you can use tools to generate like http://www.searchenginepromotionhelp.com/m/robots-text-creator/simple-robots-creator.php or http://www.seochat.com/seo-tools/robots-generator/
When dissallowing in robots file, you can explicitly specify a file or subfolder rather than just a folder.
You can also use meta tag in your document to tell the crawler not to use it
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
what's the best way to prevent google from showing of a folder in the search engine ?
A robots.txt file is the right way to do this. Your example is correct for blocking the /support/etc directory and its descendants.
am not able to use the support page anymore unless i remove the robots.txt
It doesn't make sense that a robots.txt file would affect the way your site functions, and certainly it should never affect which pages can be accessed by a human. I suspect something else is awry -- check your server logs to see what kinds of errors are being recorded.
While not the preferred method of limiting robot access, Google talks about using a noindex meta tag here. This will also prevent the various pages from showing up if they are linked to by a site other than your own.
A good discussion of limiting bots that visit your site can be found here.