SFML community forums

General => SFML website => Topic started by: 93interactive on October 18, 2013, 08:36:43 am

Title: stylesheet br0ken in some browsers
Post by: 93interactive on October 18, 2013, 08:36:43 am
Hi there,

seems you have not noticed yet, that the web pages styles are broken in some browsers.

You redirect to https and chrome started it and now firefox also does not allow cross https/http loading, so when running a page in https, all stylesheets and javascripts must also be https or firefox/chrome won't load it.

You need to change links like this:

Code: [Select]
<link rel="stylesheet" type="text/css" href="http://sfml-dev.org/styles/style.css" title="default" media="screen,print"/>

to this (double slash = protocol relative):

Code: [Select]
<link rel="stylesheet" type="text/css" href="//sfml-dev.org/styles/style.css" title="default" media="screen,print"/>

Here are all problematic files from firefox console:

Code: [Select]
[08:35:20.568] Blocked loading mixed active content "http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic" @ https://sfml-dev.org/
[08:35:20.571] Blocked loading mixed active content "http://sfml-dev.org/styles/style.css" @ https://sfml-dev.org/
[08:35:20.571] Blocked loading mixed active content "http://sfml-dev.org/scripts/highlight/styles/github.css" @ https://sfml-dev.org/
[08:35:20.571] Blocked loading mixed active content "http://sfml-dev.org/scripts/highlight/highlight.pack.js" @ https://sfml-dev.org/
[08:35:20.642] Blocked loading mixed active content "http://www.google-analytics.com/urchin.js" @ https://sfml-dev.org/
Title: Re: stylesheet br0ken in some browsers
Post by: Ixrec on October 18, 2013, 08:46:20 am
Maybe I'm missing something, but I always use Chrome, it says it's up to date, and the website looks exactly the same to me.  Can you post a screenshot of the problem you're seeing, and specify what browsers/versions you see it on?

Though this might be a good idea anyway.  Everyone loves consistency.
Title: Re: stylesheet br0ken in some browsers
Post by: 93interactive on October 18, 2013, 08:53:30 am
lol, didn't try with chrome, just knew it from some similar event... problem comes from me having the https everywhere plugin from eff installed, so the problem does not exist as long as you access the site via http:// but the plugin always tries to send you to https:// if available
Title: Re: stylesheet br0ken in some browsers
Post by: Ixrec on October 18, 2013, 09:14:04 am
Tried with Firefox (v22.0) and Chrome, both with and without the https everywhere extension, and it looks non-broken to me in all four cases.  Of course I've never seen, heard of or used that extension before so maybe I'm doing it wrong.
Title: Re: stylesheet br0ken in some browsers
Post by: 93interactive on October 18, 2013, 09:47:02 am
maybe its not enabled by default? Tried Linux/Windows current Chrome+Firefox, problem exists for sure. You actually do not need the plugin, simply accessing the site via https://sfml-dev.org should break it. But anyway, might only affect a very small user group... it is easy fixable though
Title: Re: stylesheet br0ken in some browsers
Post by: Ixrec on October 18, 2013, 09:48:45 am
Never mind, you're right.  Clicking that link and saying "Proceed anyway" does get me to a broken site.  I guess you're right about the extension not being enabled by default.
Title: Re: stylesheet br0ken in some browsers
Post by: Laurent on October 18, 2013, 09:50:30 am
Hmm ok, it's not really a mistake because sfml-dev.org is not meant to be accessed through HTTPS, but since the fix is so easy let's do it.

Is the double-slash syntax well supported by other/older browsers? Especially IE :P
Title: Re: stylesheet br0ken in some browsers
Post by: Ixrec on October 18, 2013, 10:02:10 am
I found a random blog (http://billpatrianakos.me/blog/2013/04/18/protocol-relative-urls/) that says IE's had it since v7.
Quote
IE7-8 support protocol relative URLs but they’ll end up fetching the resource twice. Once from HTTP and once over HTTPS. This can slow things down a bit but the way I see things it’s not much of a problem for anyone except the person using IE7-8 and if you’re using IE you’ve got more important things to worry about.

Is that a good enough source? =P
Title: Re: stylesheet br0ken in some browsers
Post by: Laurent on October 18, 2013, 03:43:43 pm
Ok, I changed all the relevant http:// links to //. Let's see if I broke something somewhere ;)
Title: Re: stylesheet br0ken in some browsers
Post by: FRex on October 18, 2013, 04:56:21 pm
Ok, I changed all the relevant http:// links to //. Let's see if I broke something somewhere ;)
'Random blog' says ie6 doesn't have the feature.
You can observe audience you're losing(4.9% people worldwide) here :P :
http://www.ie6countdown.com/ (page thanks to courtesy of Microsoft)
Title: Re: stylesheet br0ken in some browsers
Post by: wintertime on October 18, 2013, 08:34:11 pm
I'm sure programmers who found out about SFML are a bit more inclined to have a non-broken browser installed than casual websurfers.
Also on that map you linked its mostly just a single country which blocks half of the net anyway?
Title: Re: stylesheet br0ken in some browsers
Post by: FRex on October 18, 2013, 09:32:46 pm
I was mostly jabbing at breaking website for ie6. I'm happy that happened, we're not 2005 or something. :P
However need for ie6 compliance was what I was actually 'taught' last year in 'hypermedia' class on my 'computer science' course(fortunately no one who actually touched our works enforced it, just lecturer was slightly demented) because it's bad ux to force someone to 'buy(sic!) new shiny software just to view your website' so.. yeah.. certain cs doctors and their alternate reality..
Still I hope we get some lulz from ie6 user(s) soon. ;D
Title: Re: stylesheet br0ken in some browsers
Post by: Ixrec on October 18, 2013, 09:59:36 pm
If it matters the forums are still broken on https but the rest of the site seems fine.  I'm guessing it's not worth the trouble to go mess with all the forum software.  Plus, if we *really* wanted to support https then we'd probably want valid SSL certificates or something so the browsers don't freak out at every single link.