Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

HTTPS jquery doesn't work

I am using the code below which works fine on a regular .Net IIS Web Site.

However... on my HTTPS it doesn't work at all.

        $(window).load(function () {
            if (document.location.href.indexOf('verifinity') > -1) {

                $('head').append('<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />');
            } else {
                $('head').append('<link href="favicon2.ico" rel="shortcut icon" type="image/x-icon" />');
            }});

Open in new window

Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

can you access the favicon using the direct url

https://server/favicon2.ico

Also, don't browsers now automatically look for a favicon file?
Avatar of Larry Brister

ASKER

Julian,
Yes... I can see it using the direct url.
And yes... all browsers do look for the favicon...
My issue is that I want my site to be "branded" for different customers and they need the ability to add their own favicon.
You can see in the script I have in the question that if a "customer" string is in the url it uses a particular icon.
Otherwise it uses the default
you should use your web server to do that and not javascript.
what is "verifinity"?
also, regarding this question you also say it doesn't work in a regular page AND with https, right?
leakim971
That is correct
ASKER CERTIFIED SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks guys... the append was not happening