0

When the web application was run on http, there was no problem with the rendering of the images and template. Now, after upgrading the server to support SSL, the CSS has 'broken' with some interesting symptoms:

  1. The admin page is working perfectly fine (this question has come up a few times like such Django Admin Page missing CSS)
  2. The Index page contains images, but the background, arrangement, etc. appear as if there is no CSS - the text is quite wrong, and the layout is wrong
  3. There is no CSS problem when loading the application via iOS, only through a web browser on android or desktop/laptop

Has anyone run into this type of problem before? Any suggestions as to why the SSL upgrade could have destroyed the interface on PCs/Androids?

Community
  • 1
  • 1
kjbradley
  • 335
  • 2
  • 4
  • 20

1 Answers1

2

Try loading the CSS resources using the same protocol as the webpage itself. For example, if the page is on https, the resources should also load using https for the browser to not trigger a warning to the user.

Your browser might be blocking unsecure files.

  • 1
    Yes, it's quite likely that a browser won't be allowing non-https resources on a https page – Steve Jalim Jul 16 '14 at 16:32
  • Thank you, I am very new to django, so I will begin to search out where these references may reside. – kjbradley Jul 16 '14 at 16:43
  • 1
    It has nothing to do with django. It's a browser thing. One suggestion would be to remove the protocol from the references. For example, change `http://example.org/something` to `//example.org/something`. The browser will prepend the right protocol to them based on the referring page. –  Jul 16 '14 at 16:46
  • You were both correct really; the http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js in the index html was causing the problem... changing it to a https was a fix! Regarding browsers - I actually tested with mozilla, chrome and IE after reading this response. IE was the only browser to load the page just as it was before upgrading https... silly IE. – kjbradley Jul 16 '14 at 18:36