favicon when opening image in new tab - favicon

When I right click on my website logo and click on open image in new tab, there is only a generic favicon.
Is there a way to pass the favicon information to this specific page?
not the websites favicon

Yes, if you have a favicon.ico file in the root directory of your website browsers should (as in: are supposed to) use this for any file served from that domain.

Related

Why clicking on sidebar links takes to raw content page on github wiki?

I have created a github Wiki page Introduction.md and sidebar file _Sidebar.md in the same directory in a private repo. When I click on sidebar link I'm redirected to raw page, although the link shows appropriate url.
page Introduction.md has below content
# Introduction <a name="heading--1">
This is a web application.
And the _Sidebar.md has below content:
# Table of contents
**[1. Introduction](Introduction.md#heading--1)**
On hovering the link on sidebar it shows correct url as:
https://github.com/testorg/ecom/wiki/Introduction.md#heading--1
But on clicking the link it redirects to raw page and shows the raw content for Introduction.md above
https://raw.githubusercontent.com/wiki/testorg/ecom/Introduction.md?token=GHSAT0AAAAAATESTINGTOKENAZG2ZMAQ33POCYYHFSBQ#heading--1
Why this type of behavior, What I'm missing here?
Almost there, however, is one small issue in your URL. Instead of
**[1. Introduction](Introduction.md#heading--1)**
Remove .md from the URL.
**[1. Introduction](Introduction#heading--1)**

\Favicon.ico error in Jboss 7.1.1

I want to access my application without context root in JBoss 7.1.1
I have renamed application as ROOT.war and deployed it and
updated stadalone.xml
from
to
Am able to access the login page of my application, but moment I enter credentials and login I get "HTTP Status 404 - /favicon.ico".
I don't know where am going wrong. once i remove /favicon from URL and reload it, everything works normal. Please help me to resolve this problem.
Favicon stands for "Favorites Icon". It's the little icon beside your site's name in the favorites list, before the URL in the address bar and bookmarks folder and as a bookmarked website on the desktop in some operating systems.
The Favicon.ico shows as 404 means is that people with browsers that use favicon (Internet Explorer 5.0 +, Firefox, Opera and a most others) are visiting your site.
While seeing a 404 in your log files usually means that a visitor got the dreaded "404 Page Not Found" error, in this case it doesn't. All it means is that the default icon was shown instead of a custom one.
To get your Favicon to show there are 2 different ways to do this:
This is the easiest to do and it will show your icon no matter what page your visitor adds to their favorites. Simply upload your new icon to the main directory of your site, ie. www.example.com/favicon.ico
If you don't have access to your root directory (if your on a free server for example) or it you want a different favicon for certain pages, add this to the <head> of your html. (You can name your favicon whatever you'd like with this method)
<link rel="shortcut icon" href="/folder-name/logo.ico">
Or if you prefer to use the full URL:
<link rel="shortcut icon" href="http://example.com/favicon.ico">
Note:
If you upload a new Favicon, be sure to clear your cache for the new icon to show up.

Left-clicking a PDF in GitHub should display it in the browser or download it?

I have a PDF hosted in a GitHub directory. I have a link to this PDF in my README.md as follows -
[foo](https://github.com/me/bar_repo/foo.pdf)
so that users can find it easily when they access the repository. However when they click the link instead of opening the PDF in the browser or downloading it, the users is brought to the github page with url - https://github.com/me/bar_repo/foo.pdf - and here they have options to "View Raw", "Open", etc...(and the Open command requires installation of GitHub for windows...sigh).
I simply want to let users view the PDF in the browser or be given the option to download it if they left-click this link, as is usually the case when people click on links for PDFs on the net.
Does anyone know how I can make this happen?
You need to link to the raw version. So on the resulting page, context click the Raw button, and choose Copy link address and use that URL in your README.
A simpler option should be available since March 17th, 2015:
"PDF Viewing"
Simply browse to a PDF document and we'll render it in your browser like any other file.
From presentations to papers, we've got you covered.
Many thanks to Mozilla and every contributor to PDF.js.
Try https://rawgit.com
Copy paste your pdf path in https://rawgit.com which gives you an URL which can be viewed on a browser.

How to show favicon in subdomain xml file

I have a subdomain feeds.domain.com, The root Directory for this subdomain is in main domain(/public_html/feeds/), I
I have placed favicon in root(/public_html/) and subdomain root(/public_html/feeds/) directory.
Now favicon is not displayed in browser for xml files that are in subdomain, xml files in other directory are showing favicon though.
Why browser is not picking favicon for xml from subdomain.
Example url where favicon not showing is feeds.domain.com/all/index.xml
Example url where favicon showing is www.domain.com/feeds/all/index.xml, (this is sub domain directory showing favicon when accessed directly from domain)
If I enter url feeds.domain.com/favicon.ico browser displays favicon.
Please see and suggest any possible way to do this.
Thanks.
I got it solved, I deleted all browser history and cleared browser cache now it is showing favicon, I hope this helps others too with same issue.
Thanks.

Redirecting users to the facebook app

If I have an app on facebook that's pulling the content from http://example.com for instance, is there a way I can stop people visting the example.com site and instead redirect them to the facebook app page?
Facebook is sending a POST variable called signed_request when the page is opened within a Fan Page Tab or the Canvas page of your App. Simply check if the POST variable is there and redirect to your App's Canvas page if not ;-)
Here you can read a bit how the signed_request is used inside an App.
Kalvin is close. Props to Kalvin :)
Setup your website to default to index.html
Move the real content of your site from index.html to index-fb.html
In index.html then place either the meta tag for redirection or just javascript for location.href='' script for redirection. The url to redirect to will be in the https://apps.facebook.com/{yourappname} format.
In facebook, update the app settings canvas app url from http://example.com to http://example.com/index-fb.html
1) Pull your content from your website from a subfolder
2) Redirect them from the index.html using a meta tag:
http://www.web-source.net/html_redirect.htm
A better way would be to check if the content is being displayed inside facebook and then redirect but I have no idea how to do that
Edit the .htaccess or conf.d file on your Apache web server (or the rewrite rules in IIS) to give a 301 Permenant Redirect.
Assuming you have Apache:
1.) Log into the box using ssh or some terminal emmulation program
2.) cd /etc/httpd/conf.d
3.) Locate the the configuration file for your site, edit it using vi, emacs, nano, or some text editor
4.) See here on how to write the rewrite rule.