Non-HTTPS items while using HTTPS

by chris 2/7/2008 6:23:00 PM

I have several things on my site that have a link to another website.  Usually this involves an image or script that uses a HTTP tag.  Well this can be ugly and a pain for users when your website automatically switches over to HTTPS for things like logging on or using my Password Maker.  One option is to use some javascript to not render the html whenever you are using HTTPS.

For example, I display my Delicious tags on my page but this service doesn't have a HTTPS connection.  So to overcome this I simply exclude this service when a user connects using HTTPS.

<% if (!Request.IsSecureConnection){ %>
    <div class="box">
        <h1>Del.icio.us Tags</h1>
        <script type="text/javascript" 
src="http://del.icio.us/feeds/js/tags/dscoduc?icon=12;count=25;size=10-17;color=ff9933-ff3300">
</
script> </div> <%} %>

Now when you connect to my site using HTPS (did I mention my Password Maker application?) then you aren't prompted with that ugly dialog message that indicates there are unsecured objects on the page.

kick it on DotNetKicks.com

Add comment


(Will show your Gravatar icon)  

biuquote
  • Comment
  • Preview
Loading




Powered by BlogEngine.NET Theme by Mads Kristensen Hosted by 1and1 Hosting Sign in
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way. © 2008 Chris Blankenship

DSCODUC on Technorati  

Stop Spam Harvesters, Join Project Honey Pot   This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License  

Welcome to my blog

Welcome to my site

Villainy wears many masks,
none of which so dangerous as virtue…



LinkedIn   GeoURL

Recent Comments

Comment RSS

Wordle Gallery

Shelfari Book Library