In my v4.master on SharePoint Server 2010 I have the following markup
<head runat="server">
...
<SharePoint:SPShortcutIcon runat="server" IconUrl="/Path/to/icon.ico" />
</head>
Alternativley I tried
<link rel="Shortcut Icon" href="/Path/to/icon.ico />
After the page has been rendered, this link tag is located in the body and ignored by Chrome (IE11, latest FireFox do render the favicon in the body section).
Is there a way to let SharePoint render this in the <head> section?
Use "PlaceHolderAdditionalPageHead" in your page layout.
And add the code you would like to push into Head section of your master mage
Related
Something werid happens to me, I am going to build my personal website, put favicon.ico in the header.html, like below:
<link rel="shortcut icon" href="/favicon.ico">
And clean up the history records of the browser, Firefox shows the icon, but Chrome doesn't show up.
I can't figure out the reason, please help me.
This is probably because you have non-header markups in your head. For example:
<html>
<head>
<div>This div has nothing to do here. It's a "body" markup.</div>
<link rel="shortcut icon" href="/favicon.ico">
</head>
<body>
...
</body>
</html>
When Chrome finds a non-header markups in the head (eg. div, span, p...), it considers the header to be completed (even if it is not technically closed) and everything that follows is supposed to be in the body. And since the favicon markup doesn't work when it is in the body...
This behavior is specific to Chrome, this is why your favicon work in Firefox.
I have an asp.net web form with a head section like this:
<head runat="server">
<title>Web application</title>
<link rel="Stylesheet" href="resources/material.min.css" />
<link rel="Stylesheet" href="resources/style.css" />
<link rel="shortcut icon" type="image/x-icon" href="resources/favicon.ico" />
<script type="text/javascript" src="resources/material.min.js"></script>
<meta http-equiv="X-UA-Compatible" content="IE=10"/>
</head>
The application won't work in Internet Explorer compatibility mode, which unfortunately our firm enables in IE by default. Normally I fix this by adding the meta tag above, but for some reason this isn't working on this page. If I move the meta tag to the top of the <head> section, before the style sheets, it does work. So my question is this: is there a reason the order matters? I'm baffled.
Yes, order matters. The browser procedurally processes HTML. If the meta tag is first, Internet Explorer knows to use Compatibility Mode almost as soon as it starts parsing the document. Otherwise, it's already started parsing and processed everything else - your CSS, JavaScript, not in Compatibility Mode.
I am using <iframe> in my index.html page. But its replacing the original favicon of my index.html page with blank.
Unable to see the favicon for index.html
If am commenting the tag its working fine in IE9.
<html>
<head>
<title>Some Title</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<iframe src="http://somesite.com/"></iframe> <!-- Not Working Unable to see favicon -->
<!-- <iframe src="http://somesite.com/"></iframe> --> <!-- Working I can see favicon -->
</body>
</html>
Thanks in advance for your answers!!!
Found in IE if we are pointing to a URL in IFRAME and its response status is not 200 then It will replace the favicon.
so make sure you must have some valid response from iframe URL.
In the Project of GWT/GXT.
in project.html.
I added the favicon and change the color of the body and also put an image .
But when i run the web project. i cant see the the change in body color, favicon and the Image.
My web Projects starts from login page which is in a center of on the RootPanel.
I want add a Image and Fevicon in HTML
In my test page test.html i can display favicon and image.
gwt project.html
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>My Page</title>
<link rel="icon" type="image/png" href="fevicon.png" />
<link rel="stylesheet" type="text/css" href="gxt/css/gxt-all.css" />
<link rel="stylesheet" type="text/css" href="project.css" />
</head>
<body style="background-color:d8d8d8;>
<img class="normal" src="main.png" width="700" height="80" />
<script language='javascript' src='project/project.nocache.js'></script>
<iframe src="javascript:''" id="__gwt_historyFrame" style="position:absolute;width:0;height:0;border:0"></iframe>
</body>
</html
>
As #Manolo suggest check working folder. i.e. war/modulename and also clear cache of browser. because if browser already have cache of it so sometime changes does not reflect.
It seems you are modifying a page which is not being copied to the working folder of your app
when running in web mode.
Sometimes eclipse does not update files from sources to working dir.
Try to find the file test.html in other folders and compare their sizes.
In your src/main/webapp changes not seen at a moment. Refresh project and restart development mode. If any changes recompile your project(Last choice).
I have a problem with a web page. The introduction of a simple <base href=""> tag in the head of the page creates lots of unexpected problems such as dismantlement of the layout of the page, size of figures etc. Here is the web page without http://vlab.mooo.info/tanks and this is with the tag: http://vlab.mooo.info/tanks/wrong.php.
Note: I've tested with Firefox and Chrome.
You have file
http://vlab.mooo.info/tanks/style-tanks.css
which is called in
http://vlab.mooo.info/tanks/
via
<link href="style-tanks.css" />
With base href set to the root, the browser looks for http://vlab.mooo.info/style-tanks.css which is wrong
Change to
<link href="/tanks/style-tanks.css" />
The problem is line #14:
You have
<link rel="stylesheet" type="text/css" href="./style-tanks.css" >
Should be:
<link rel="stylesheet" type="text/css" href="./tanks/style-tanks.css" >