After using CNAME to redirect URL, Webfonts no longer work - webfonts

Running in chrome:
www.AshGavs.com
vs.
http://ashgavs.cloudant.com/site/_design/AshGavsCouch/main/index.html
Really confusing, especially because the fonts are hosted on google...

D'oh. Cross domain error. I had simply listed "/fonts.css" for my fonts file, so I think it was going to "AshGavs.com/fonts.css" for the file.

Related

Do browsers request favicon.ico even if it is not linked in the HTML

I am looking for a site for somebody, and fixing errors as I find them.
There is no Favicon.. that is ok, I can fix that.
My question is, do browsers (or certain browsers, Chrome in this case) request favicon.ico as soon as they load a site.. or maybe on check that there is no alternative icon path mentioned in the source.. irrespective of whether "favicon.ico" is actually mentioned in the page source?
That was the original behaviour, yes. /favicon.ico was an implicitly present file which (some) browsers would check for. Only later did that actually morph into a proper standard with <meta> tags, arbitrary file names and image formats other than .ico.

web site different rendering on remote an local url in safari

I'm developing my wedding's website, and I have a problem I really don't understand: when I browse it on my local machine the site is rendered correctly, but if I browse the site remotely there is a section shown in a wrong way. In order to be sure about the files correctness I just removed on ftp all the site's files and re-uploaded them from scratch. Same problem. It happens on safari only, on all the other browsers the site is rendered fine
this is how I see the site locally
this is how I see the same file remotely
How can it be possible?
For anyone who want to help the link to the site is http://silviaesimone.com
thank you
The server is using the wrong MIME type for the Bebas Neue font. It sends the font as text/plain which, apparently, Safari can't handle.
Solution: make sure that files with extension .otf are served with the correct MIME type, which is font/opentype.
(It depends on the kind of server how you need to do that; see here for IIS or here for Apache).

Wrong path to image, css, javascript etc. when using protocol-relative URL

when I turned on SSL on my Drupal 7 website I've also turned on module to replace all images, styles, etc. path from
src="http://example.com/path/to/my/image.jpg" to
"//example.com/path/to/my/image.jpg".
I've noticed, that right now I have a lot of page not found (404) in my log, and they look like https://example.com/example.com/path/to/my/image/jpg.
Do You know, what can I do to prevent this 404 errors? Maybe some htaccess redirect? Do You think It's fault of old web browsers which don't support protocol-relative URL?
I had exactly the same problem and this addition to .htaccess seems to have resolved it for me:
RewriteRule ^//example.com/(.*)$ /$1 [NC,L,R=301]
My theory is that those 404 errors were the result of some poorly written bots crawling the website or some non-standard browsers that don't support protocol relative URLs. Normal browsers add the proper protocol to the URLs before accessing the server, so in theory the server shouldn't ever see such URLs in the requests.

Font-face don't display well

I have a wordpress site here http://itrain.com.my/v3/ as my Home Page
I am wondering why it is not displaying well in Firefox?
Anyone who is good in css?
By the way, try to look at the subpages http://www.itrain.com.my/v3/index.php/about-us/
it display well.
I am really wondering why does it happening.
Any can help me? Any suggestion, recommendations?
I think problem is with URL.
It work http://www.itrain.com.my/v3/ but doesnt work on http://itrain.com.my/v3/
Set on your server redirection (301) from non-www URL to www URL.
I would wager you have the font installed on your local machine. I don't see it on any browser. Instead, I get two 404 errors.
In other words: please make sure the font files are available at the locations their respective locations: http://www.itrain.com.my/v3/wp-content/themes/itrain/img/fonts/big_noodle_titling-webfont.woff and http://www.itrain.com.my/v3/wp-content/themes/itrain/img/fonts/bebas__-webfont.woff.
[EDIT]
I've just looked at the fonts directory listing on your site. The ttf and eot versionf of your fonts are available, the woff and svg are listed, but result in a 404 error. Furthermore, the ttf version (downloaded instead of woff in Firefox, after getting a 404) seems to generate an empty HTTP response.
So... Make sure the fonts are there, make sure they have proper privileges set (like 0644). I can't see any other issues than the font files themselves as the CSS appears to be correct.
[EDIT 2]
#kubedan provides a great tip that seems to fit your concern about the htaccess: the domain the fonts are downloaded from is always preceded with www. Firefox will refuse to download such content, you need to use the same domain.

link to local disk

Is it possible to put a html link on a page that opens a file in local disk?
Like c:/myFolder/myfile.xls
This page is not actually going to be on web, but this feature would be needed for demostration purposes only. When the page is on web, the file is too, and link has url value.
You could use
my link
Be wary that this may not work for all browsers (ie firefox) due to security reasons (See here) and it certainly wont work for other people accessing the webpage.
This would be a risky thing to do. As not everybody uses a PC, it will be different for a mac and a linux than a PC. Also not all browsers allow you to do it, such as Firefox, it dis-allows it due to potential security risks. But anyway here's the html code if you still wish to do it:
Click Here
You want to use the file: scheme.
file://C|/myFolder/myfile.xls
Tried it, but link does not open a thing. Sorry, I could not put this as a comment. Please edit.