SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict
    Join Date
    May 2010
    Posts
    219
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    coding for https

    when you look at this site in Internet Explorer, you'll notice that some of the pictures are missing. But if you look at it at the unsecure location (http:// instead of https://) you'll notice the pictures are there. Why is that and how do i fix?

    please advise. thanks in advance!

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,183
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    IE has a built in fail safe that detects an SSL connection but stops any unencrypted content from entering the page without manual input from the user to override the browser, what you will need to do is ensure all <link>, <script> and <img> elements use HTTPS or you will continue to run into issues as currently your page is only partially encrypted.
    Blog/Portfolio | Evolution Xtreme | DFG Design | DFG Hosting | CSS-Tricks | Stack Overflow | Paul Irish
    Having lame problems with your code? Let us help by using a jsFiddle

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Another solution might be not to use the full URL in your image links. E.g. Instead of links like this:

    Code:
    src="http://www.emazzanti.net/wp-content/uploads/digital-disaster-featured.png"
    use something like this

    Code:
    src="/wp-content/uploads/digital-disaster-featured.png"

  4. #4
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Another solution might be not to use the full URL in your image links. E.g. Instead of links like this:
    Another, similar option would be to use a protocol-less URL (handy for when you do need the domain, and can't use root relative URLs)

    e.g. including external scripts
    Code:
    <script type="text/javascipt" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    e.g. including things on your own server that might be served on a different domain:
    Code:
    <script type="text/javascipt" src="//cdn.example.com/scripts/example.js"></script>
    If however, everything you're referencing is on the one domain, go with Ralph.m's solution, root relative URLs
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  5. #5
    SitePoint Member
    Join Date
    Jul 2008
    Location
    central Texas
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question https for dummies needed

    I understand using the relative paths is the best way to go, but is there a way to do it if you have some pages that are several layers deep and you are using the full paths?

    I also have links to other sites, does that trip the error message?

    Sorry to sound so dumb, but while I can find lots of information on purchasing and installing SSL, I can find very little about the actual page coding. I have changed all the links within my website (that point to my website) to https but I still get the error message.

    Anybody know of a good book? Thanks so much for your help, Kathy

  6. #6
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kralspace View Post
    I understand using the relative paths is the best way to go, but is there a way to do it if you have some pages that are several layers deep and you are using the full paths?
    You should be able to use root-relative URLs (like in Ralph's example). They will work no matter how deep your page is nested.

    Quote Originally Posted by kralspace View Post
    I also have links to other sites, does that trip the error message?
    The actual links themselves won't throw an error message as they aren't resources being loaded in to your page

    Quote Originally Posted by kralspace View Post
    I have changed all the links within my website (that point to my website) to https but I still get the error message.
    On whichever page you're seeing that message, take a look in the source code and see if anything is being referenced with http://
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  7. #7
    SitePoint Member
    Join Date
    Jul 2008
    Location
    central Texas
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys, I'll give it a try. The reason I was trying to get around using relative links with a lot of ../../../ is that I have several people who with very basic code skills are able to edit their own content and they understand the links better that way. Guess a new class is in order if they want to use the https.

    I appreciate your time and expertise and will let you know how it goes ;-) Kathy

    PS, I got more information here that I have all day looking through books and other websites, the Sitepoint facebook page sent me here.

  8. #8
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kralspace View Post
    Thanks guys, I'll give it a try. The reason I was trying to get around using relative links with a lot of ../../../ is that I have several people who with very basic code skills are able to edit their own content and they understand the links better that way. Guess a new class is in order if they want to use the https.
    Whether you're using relative links like you're showing here or root relative links, there should be no problem as neither of them specify the protocol used (and thus they will use the protocol that is currently in use).

    It might be worth teaching people about root relative links though as that can often be a much better way to go than having "../../../../../../../images/whatever.jpg"
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  9. #9
    SitePoint Member
    Join Date
    Jul 2008
    Location
    central Texas
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wish me luck, I work with math, science and biology teachers who are geniuses in their areas but it's a slow go getting them out of their comfort zones...lol


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •