I'm trying to implement styled media receiver, but for some reason, my chromecast won't show the graphics. I get only name of my receiver on black background. Preview in cast dev console looks OK though.
The css I'm trying to use is this: https://krizan.se/styl_latest.css
What I tried and did not help:
CORS enabled and disabled, doesn't make a difference. Left it enabled. Verified by streaming video from the server on chromecast
I tried using both absolute and relative paths for images, no change.
Tried using both http and https, no change either.
The image I'm using is 1280x720, as in guidelines. Tried changing it to different sizes, no change
Remove and register my chromecast again in dev console, no change
I spent too many hours trying to fix this, trying all combinations of above, but still can't see my graphics on my cast device. There was one question on stackoverflow with the same issue, but without answer.
Is this some kind of bug or am I doing something wrong? Any help greatly appreciated.
You don't appear to have a valid certificate for the HTTPS connection. Also, the URL is currently returning 404 for the CSS file.
So my problem was that url that was hosting the CSS file was not the raw CSS file. So i used this website https://rawgit.com/ to host the CSS file.
Related
I used a tutorial to make some custom icons in Google Maps API for some local places. When I am in Dreamweaver and testing on my local server, the icons appear just fine. However, when I upload to my host and try to pull the page up on any browser (safari, chrome, canary, firefox), the images do not load. The placeholders for those images do show, though. I cannot understand what the issue is as I have reloaded and rechecked the code hundreds of times. Any help with this would be appreciated. As the code is very long, I have only included some snippets and the address where it is loaded.
To see the page, go to http://www.theriveroverlook.com/Local.html
I tried to load the code using the forum rules, but no matter what, it would not allow me to put the javascript in this post!
Please let me know if you can help me! This is the last piece of the puzzle I need to load this website! I am a newbie coder so I have made a lot of beginner mistakes!
Edited to add:
Thank you for your help. When I renamed the folder, it was fixed. For some reason, it did not like the folder name "icons". Perhaps this has something to do with Google's API
I get the following errors when I load your page:
Since those are the images you are using to create your custom icons they all fail to generate and won't appear on the map. Make sure you are hosting your images correctly and it should work fine.
I Tried to find the answers here on stackoverflow but couldent find it , so I hope someone can help me.
The question is pretty simple I guess, Im trying to optimize My site with a image sprite instead of many images.
And I wanted to know if a background:inherit counts as HTTP Request?
Was thinking otherwise I could let My DIVs just inherit the first DIVs background image and save me a lot of Requests.
And do Two img links too the same image sprite count as one or Two HTTP Request? I mean do the browser understand that it already download it?
Assuming that you cache images, two (or a thousand) image links will only issue one HTTP Request, as long as the image itself doesn't change, though it's really about the browser implementation. The same goes about using inheritance or even using the same resource in different CSS elements. If you are using Chrome, I'd suggest that you'll take a look at the network tab in the Developer tools and verify that this is indeed the case. Otherwise, you can try using Fiddler.
If you'll share a link, I'd be more than happy to take a look at it myself.
Is there a way to "cache" background image.
For example..
Background image is 3x3px and it's set like this:
body {
background: #000 url(bg.png);
}
When refresh happens, background image "flickers" for second.
Is there a cross-browser solution? (for Apache/PHP server if that is relevant)
If you go to seo.hr and browse navigation,... you can see what I'm trying to do.
http://www.seo.hr/
http://www.seo.hr/usluge/izrada-stranica
http://www.seo.hr/usluge/optimizacija-za-trazilice
I think you need to determine first if the issue actually is a caching issue or if it's caused by the size of your image. You could use a program like Wireshark or Fiddler to do this, but to be honest it's overkill for your need and you probably already have a browser with developer tools.
Here's how you determine where an image is coming from in Chrome (the other browsers are similar).
Open your developer tools and go to the "Network" tab.
Find "bg.png" in the list of network requests and click on it's name. Below is an example of having selected a stack overflow image from this page.
Notice that it says status 200 (from cache). The browser didn't need to go out to the server and rerequire that resource. It used the cache. If that "from cache" text wasn't there it wasn't reusing cached resources.
There is also the potential that you'll get a status code of 304. That means that the server said the image wasn't modified since the last request that you made. You do make the server trip in that case.
Ok, so my image wasn't in cache... now what?
There are a few reasons that this could occur.
You're request headers aren't set to tell the browser to cache the image (also found in that same "Headers" tab that you would have seen that Status Code if the browser actually went to the server for the image). You'll want to set cache-control and expires to something that makes sense for you. Cache headers can get a bit complicated you may want to browse through this caching tutorial document.
Is it SSL? If so not all browsers cache this but most modern browsers do. Set cache-control: public on these images (and also expires).
The real question here is how do you fix this? Unfortunately, that's entirely dependent on the server and/or the framework that you are using. As the OP is using Apache, they can find great documentation on the Apache module mod_expires to figure out how to tweak caching for their site.
Yes!
You should decide whats more suitable for you, but at this time we have some methods, like:
Pure HTML/CSS
Javascript Only
Mixed HTML/CSS/Javascript
Using base64 to encode the image somewhere on the source code
At this point I recommend a mixed solution, using javascript. This will make it work on many browsers as possible.
There is a good tutorial at:
http://perishablepress.com/press/2009/12/28/3-ways-preload-images-css-javascript-ajax/
Having several images in one can take you a step beyond that, so check this sprites article:
http://www.alistapart.com/articles/sprites/
You can try to encode your image in base64 and put it directly into CSS source code. I found a question about pros and cons over here.
Make your tiled image much much larger, when the browser engine renders the page it has to multiply each tile to cover the entire width and length of your object, which results in bad performance with small tiles on large objects.
Small tiles -> more repetitions -> slower performance
I developed a website using code igniter, styled it with CSS, locally it works fine but online it looks like css is not loaded it picks up the old css style. I checked the link but it's correct. What gives?
Without more information (such as seeing the site in question), I can't give you a direct answer, but I can give you some pointers.
My suggestion is to use a tool like Firebug (in Firefox) or Chrome's Developer Tools, etc. These tools allow you to see full details of all requests being made by the browser.
(the exact instructions will differ according to the tool you're using, so I'll assume Firebug for simplicity).
Open your page in the browser, with Firebug open, and look at Firebug's "Net" tab (And make sure that the option below the tab is set to "All"). This will list all requests that are made by the browser.
The key thing for you is to look for any 404 errors. Since you say your CSS isn't working, it's a pretty good bet that your stylesheets are failing to load. The 404 errors listed in Firebug will show you why they're failing to load.
If you hover over the filenames, Firebug will expand it to show you the full URL that it attempted to load. This will almost certainly show you that you've got something wrong in your configuration, and it's trying to load the stylesheets (and possibly other files too) from the wrong location. This should show you what's going wrong and give you a enough clues to be able to work out how to fix it.
Hope this helps you solve the problem.
I have a friend that has a really strange issue with my website. When he clicks on http://www.copeo.fr/ the page displays fine but when he clicks on a link like www.copeo.fr/user/ the CSS is not applied even after a refresh. The raw html does display.
I asked him to display the CSS that is hosted on amazon S3 hcopeoressources.s3.amazonaws.com/style/futurvert/style.css and it displays fine.
The code validates on W3C validator so does the CSS. I am lost what could be the origin of the issue. Could it be its enterprise cache? configuration of IE7 on his machine?
If it happens to someone else who could explain the issue to me, I am all hears.
Thanks
Ok got my answer. The firewall blocked the CSS that is stored on amazonaws and for the first page, it was a cache that was filled outside of the company firewall.
Sounds like he is using relative path names. /foo/bar.css will resolve to sitename.com/foo/bar.css but foo/bar.css will resolve to sitename.com/currentpath/foo/bar.css.
There is an IE bug that if you have more than 30 style sheets, some or all of them won't show:
http://support.microsoft.com/kb/262161
It could possibly have something to do with that.
When I hit the CSS URL I got:
"This XML file does not appear to have any style information associated with it. The document tree is shown below"
We use S3 at work for this type of thing and don't have issues, but I think pulling the CSS file off amazon S3 and storing it on a more traditional server might help with your trouble shooting. Or even solve the issue.