What is causing apple-touch-icon.png 404 on android tablet - php

So, on an android tablet I'm getting a 404() for site/apple-touch-icon.png. Which, the 404 makes sense because no such file exists. But what's more, that file is referenced no where in the markup. I understand that apparently this icon can be automatically sought out depending on the inclusion of certain mobile-related META tags, but no such tags are anywhere in the code either. With the exception of the title, description, and keyword tags the only meta tag in said code is a
<meta name='viewport' content="width=1000">
and from what I've found, this wouldn't cause this 404.
Additionally, the only time said 404 seems to occur is when the user 'logs in.' The user can log in from any page on the site, but navigating such pages normally causes no problems. The login flow takes the user to a designated url, performs validation etc. and then redirects the user back to wherever they came from. No meta tags are output prior to the redirect. But somewhere in this flow, the tablet's browser believes it needs to seek out the 'apple-touch-icon.png' file.
Does anyone have any ideas as to what might be the culprit? Is it the result of a redirect without any output? If so, how might I discourage the client from behaving as such? I'm just at a loss trying to figure out what's causing it.
In case someone thinks it relevant, the site is built with codeigniter, and the redirect is using their core method. Thanks very much for any help.
EDIT
To clarify, because I realize this was written poorly (my bad), the tablet is NOT getting a RESOURCE 404. The tablet's browser is actually navigating to the url of the non-existent file. The result is a dead page.

Apple devices make a request to apple-touch-icon or apple-touch-icon-precomposed.png to use that image as a bookmark for your site, similar to how desktop browsers request favicon.png.
Presumably the android devices are just copying the IOS behaviour as they are hoping an icon will be available in that location.

I'm seeing requests for this image, plus apple-touch-icon-precomposed.png too, in my Apache http log.
Obviously, I don't carry any apple content on my site. It's probably the result of either someone's client or their carrier botching an ad injection when they visit my site. Favicon requests would be .ico files. I'm thinking of having some fun and putting goatse up with those image names, lol.

Related

GETTING A WEB URL FROM THE DATABASE AND EMBEDDING IT ON MY PAGE

Thank you guys. I am designing a system where by the admin registers a newspaper and it's URL so that when a user chooses say Newspaper X, the webpage is embedded and loads.
I have used an iframe but there is a problem.
Whenever I try to pick the webpage, it can't load even when there is an internet connection.
It shows the link like this:
Springs/www.newsx.com WASN'T FOUND. Remember, Springs is just my project folder saved in my www folder...on my C partition.
Tried echoing the URL and it brings www.newsx.com, I don't know why it loads with "Springs" first.
Newsx.com is just a specimen site. Please help me, don't roast me. Thanks
iainn's comment is cryptic but correct: If you don't add the protocol, the browser will think it's a relative path.
So if you are on C:\Springs\test.php, the url www.newsx.com will be interpreted as C:\Sprints\www.newsx.com.
Your code could automatically add http:\\ if it is not there, but since some sites have http where others have https, you're probably best off by explicitly storing that information.

Facebook Open Graph Refresh

I've used the debugger - > https://developers.facebook.com/tools/debug/og/object/ which shows the correct image and tag line for my domain when showing the initial existing scrape information. It also shows correctly when I fetch new scrape information.
However, when I attempt to share the url from any timeline, it shows an old image and old tag line. I've tried variants of ?fbrefresh=timestamp, ?fbrefresh=1 etc. I've even appended a timestamp to the og:image url.
Additionally, the dev tool complains about the og:image saying it could not be downloaded referencing the url (which is valid and pulls up the image in any browser) and again is shown correctly at the bottom of the dev tool page, or it is too small referencing 200px x 200px minimum, however the image is 540px x 300px! And goes on to say its going to use the older cahced image instead which IS what shows when I attempt to share the url.
Furthermore it also complains about "Inferred Property" for og:url, og:title, og:description and og:image even though when I view the scrape the tags are clearly there each with their own meta html element and explicitly providing a correct "content" attribute. I have verified the og:url, fetched url, cannonical url and cached url are all the same.
I've also confirmed trying the url w/ and w/out http, https, and www combinations make no difference when sharing the url. The only difference that clearly shows a problem is the amount of likes is different even though I would expect fb to know w/ and w/out www. is the same domain since they share the same og information. As a matter of fact, w/out the www redirects to www anyway.
It seems to me as if the fb og system has some serious bugs but no way to contact the dev team or report the problem that I can easily find.
I'm posting here first to see if I'm overlooking some crucial part that the stack community can help with.
I found that everything started working properly once I forced a new scrape using the dev tool against all possible domain variants. I had thought I had tried this already but I guess I did not. Such as:
"mywebsite.com"
"www.mywebsite.com"
"http://mywebsite.com"
"http://www.mywebsite.com"
"https://mywebsite.com"
"https://www.mywebsite.com"
Implement all open graph tags, using the main URL only and scrape new information using the debuger. The posts sharing that URL or ANY variants will have the image, description, etc from the URL you specificate on Open Graph og.url tag. All the variants points to the same URL. There is the only place the og information is ;)

Facebook share for my site resulting in blank page

When I try to share any link on my site with facebook sharer.php, I get a blank page
I want to share
http://sportmenow.com/bar.php?id=10
with
https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fsportmenow.com%2Fbar.php%3Fid%3D10
But this sends me to a blank page (firefox and chrome)
as does simply
https://www.facebook.com/sharer/sharer.php?u=sportmenow.com
Is this because of some issue with the site hosting? It is accessible to the web...
I needed to add facebooks OG tags. I guess this is a relatively new requirement? I inherited this site recently, so I was not present when it was implemented first, but I hear it was working.
How did I infer this
Step 1 - I have just discovered the Facebook debugger
this page suggests that there is something wrong with the formating of my html or something in that area, and it is possible that the critical error is the one causing this issue.
There is also wave.com which also performs such checks, but not sure if they are the same errors.
Step 2- Critical Error Linting URL: An internal error occurred while linting the URL and others kept suggesting the og tags which led me to try it out. Adding a og:image tag fixed it.

Can I cache redirect result without caching the redirect?

On a certain site I need to count the amount of times some image are displayed. This is solved by directing the image src to a php script that does the counting and then redirects to the actual image using 302. The script part works fine and is launched every time the image is requested, but I'm not sure if the output image is cached by the browser or how to check if it is. My current assumption is that the is not cached because it was pointed by the 302 redirect.
Ideally it would be perfect if I could achieve this result:
Image is requested via url with php script
The script does a 302 redirect to the actual image
The browser recognizes the address of the 302 redirect and loads cached image
I guess it would depend on the browser, but is it even possible to achieve this result?
P.S. It's more of a theoretical question, as it won't matter much for my particular problem (the images are quite small).
I did what CBroe suggested and now I know that it works how I wanted it to (at least in Firefox). The browser is smart enough to load the cached version of images even if I redirect to them from my script via 302.
The answer appears to be yes. My methods of testing this were originally limited to FireBug, but in FireFox developer tools network tab I was able to see all the redirects that happened and those were done in the way I hoped for.
Previously I wrote that in a comment to the question, but I probably should have posted it as an answer.

Help - use PHP-broswer, or proxy or get_page_contents or include page, or something else?

I am trying to develop a web application for which I need to capture a specific user-driven event (such as mouse dblclick) occurring on a different-website page loaded through my website.
What I want to do is :
User visits my website - hosted by me.
There, user types in any website URL (e.g.: http://www.example.com)
That URL page gets loaded as is.
When user double-clicks mouse over any link or image from that page, a popup/side-panel is displayed with content related to that particular image or link.
I can do this with a combination of PHP get_page_contents or include-page, and javascript dblclick.
However, when user clicks on any link or submits a form, the control goes to that other website, where I cannot show the side-panel.
I might be able to handle the links by proxifying them when user clicks on any of them. How do I handle forms submission and other stuff ?
I can use a full-featured proxy, but that will be too heavy just for the purpose of capturing the event.
My question is that is there a way to write some kind of light PHP script that sits on my website - that loads other websites contents as is, but lets me capture the mouse-dblclick event to show related-content in the side panel .
I have already searched the internet, but could not find anything.
Any help is really appreciated. Thanks.
This sounds way too complicated to ever get reliably working IMO. Proxifying complex requests on 3rd-party pages? Maybe even with some additional AJAX that you'd have to proxify too? I may be wrong, but I think you'll go crazy and get swamped with complaints about sites not working.
I don't know what your web application is supposed to do but I would strongly consider building a Firefox extension (that has much more rights to access and do things on 3rd party sites) or similar.

Categories