I recently hosted a site. But when I enter my site address as for example www.example.com then my css style sheet are working fine.but when I enter the site as http://example.com then css is not working only the html body is showing.What is the problem behind this?
The issue may be because of the redirection of domains. The http://www.example.com and http://example.com are two completely different urls. You have to redirect either one to other. Also, check other urls of your site whether the redirections are working properly or not.
try using Protocol Relative URLs, these are used for linking to a website that offers both HTTP and HTTPS.
and also clear your cache.
< link href="//www.example.com/css/your-style.css" rel="stylesheet" type="text/css" >
go through this link for more info
http://www.paulirish.com/2010/the-protocol-relative-url/
Hope this work!
Related
So I'm pretty familiar with html, css and java Script. And this moving company I work for wanted to know if I could fix this unsecured link in there html. I used Why no Padlock? and found that this link in the head tags is unsecure
https://www.whynopadlock.com/results/bcfb1f57-2f59-4787-8979-24beea641fe0
You can see that it's using http. Would making it https fix the issue or break the link?
Test result:
A file with an insecure url of "http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800&subset=latin,latin-ext" was loaded on line: 20 of your site.
This URL will need to be updated to use a secure URL for your padlock to return.
I just had a look at your test results, it basically says that you include a google fonts stylesheet. Update that <link to use https:// and you should be good.
Making it https:// will make your site inaccessible if you haven't obtain what is called SSL for your domain.
To fix that, obtain a SSL certificate for your website and the site will be served with https:// even when accessed with http://
I have the problem, that my website acts different if I call it via the https protocol. To be more precise it looks like it handles the CSS in a different way.
What I want (and how it actually works via http) is kind of a navigation with different tabs. Here is an image of the navigation part:
http navigation
And here is an image of how it looks like when it's called via https:
https navigation
I have also created a fiddle with this part of my website although it does not proper work inside the fiddle. (maybe because the jsfiddle site is also via https protocol?)
Fiddle
However, please have a look at the current website to see the difference:
This is the website via http:
http website
and here how it looks like when it's called via https:
https website
You guys ever had a similar problem or any idea how to solve it?
I was the opinion that the protocol should not make a difference.
Take a look at your console.
You should see a lot of Mixed Content errors or warnings if you are using Chrome.
When a website is served over HTTPS, all its resources must be served over HTTPS too. When a resource is not loaded over HTTPS, the browser will block it because otherwise it defeats the whole purpose of using a HTTPS.
When one resource is blocked, the content from these resources won't get executed. Maybe that is the reason why your layout breaks because something is not being executed properly.
So try to change your resources into HTTPS protocol. If you are using APIs and those API does not provide HTTPS link, then you should look for another API.
In your case
This is the culprit.
http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic
You can find it in head section.
Your font should be in Source Sans Pro but because it was blocked, Helvetica or Arial was used instead. Thus breaking the layout.
Change it to HTTPS and it should be fine.
I don't know much about HTTP requests, but I can tell you two things:
- The browser cascades and parses CSS in different ways. HTTPS requests are processed in different ways. Maybe check you cascade.
- That website looks nice
The HTML redirection will work on numerous websites, but It won't work on website like Youtube, Soundcloud.
Ex:
<meta http-equiv="refresh" content="1;url=https://soundcloud.com">
This does not work. Did Soundcloud block the redirections?
No, a site cannot prevent another site from redirecting to it.
Test in another browser and check your network settings - it is not possible for a website to know how you visited it - they can only tell where you were before your landed on their site (via HTTP referrer)
I've created a Ruby on Rails app which is located at heroku, you can check it here "http://soundcloud-dj-contest.herokuapp.com/"
App is working perfectly and I've placed it inside the iFrame on facebook so it should work like facebook app.
Every link is working beside this button on top "Logirajte se da uploadate". This link leads to another page, soundcloud "soundcloud-dj-contest.herokuapp.com/login".
It works on main page but inside an iFrame I can't get it to work. I don't know what to do :/
I've uploaded iFrame here http://facemaskbliss.com/test/test_frame.html
Please tell me how to solve this problem.
try putting target="_blank" and also giving the full path instead of just "/login"
I had the same problem with a link inside an iFrame. I was using the absolute url ("http://example.com").
I finally got it to work by using the relative path to the page ("../example_folder/").
My guess is that for security reasons "foreign" links using https are "disarmed" now in iFrames, even if they are on the same domain. Because the link (absolute url) works when not using https.
Edit: Now that I think of it is because I was mixing http and https.
I want to remove insecure content from site
I added facebook social networking box by using following GWT code in HTMLPanel
< iframe width='244' height='242' class='fb-fan-box' src='https://www.facebook.com/connect/connect.php?id="+ FacebookConstants.FB_DUBLIN_PAGE_ID+ "&connections=10&stream=0&css=https://www.supergroupers.com/facebook.css' frameBorder='0' scrolling='no' allowTransparency='allowtransparency'>
but when i run above code in browser it internally adds following css file which is insecure
< LINK rel=stylesheet type=text/css href="http://external.ak.fbcdn.net/fbml_static_get.php?src=https%3A%2F%2Fwww.supergroupers.com%2Ffacebook.css&appid=106562422725875&pv=1&sig=52d2643d471dad5f75d528ba4ea74dcb&filetype=css">
Is there any why to change that http to https
Thanks
but
You should realize that adding content from any other external domain is in itself a security and privacy issue. If you are building a website that warrants https, you should NOT be including content from facebook.
Second, the issue you describe is a problem with facebook. They should be using protocol relative urls, and they are not. Nothing you can do to fix it, unless facebook provides a https version of their site that has a different url.