You need to sign in to do that
Don't have an account?

Issue with Http and Https access in visualforce pages.
Hi all,
I have a issue with Http and Https access in visualforce page. I am using jquery remotely hosted lib as: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
and I have added the address in remote site setting too.
But when i change this to this: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
Http to Https (also added this in remote site setting). The script stops working!!
Did any body faced the same problem??
When you say the script stops working, does it fail to load or are there problems once it has loaded?
I've used this without problems in the past.
The script is not loaded (fail to load)
I have checked it in session Setting and unchecked Use Http and now in I.E I get a warning to use http and when I click No its works.
But my question is why we cannot call a http address from our visualforce page.
Re: I got this from Inspect Elemt:
[blocked] The page at https://c.ap1.visual.force.com/apex/TwitterTweetsDemo?core.apexpages.devmode.url=1 ran insecure content from http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js
I'd expect you to be able to use https in a visualforce page - I assume this is an internal page, as you are getting a warning when you use http.
Can you get at the loading error? (For example, google chrome would tell you this if you opened the inspector and looked at the resources).
I got this from Inspect Elemt:
[blocked] The page at https://c.ap1.visual.force.com/apex/TwitterTweetsDemo?core.apexpages.devmode.url=1 ran insecure content from http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js
This is the error when you use http - do you see an error when you use https?
Nop I don't get any kind of error while using Https.
You must be getting an error somewhere, or the resource would load. It won't be a javascript error.
I found out that if i remove https from my browsers address bas and load the visualforce page as http then the script load with no error.
So is this a visualforce page exposed to a force.com site?
No its not a VF exposed to a force.com site..
Ah, okay so you aren't enforcing SSL for your Salesforce instance?
Can you access the https version of the resource directly via your browser?
Yes i can access it through browser..
I don't understand this I'm afraid - the script is loaded via the browser rather than via Salesforce, so the fact that you can load it directly via the browser indicates you should be able to access it via an include.
When you switch to https, does the HTML markup to include the file look correct?
Yes that is what i am saying .. and the markup are comming correctly..
So how do you know that the script isn't loaded? If the markup is generated correctly and you get no errors, that implies to me that it has been loaded.
Because When using http the alert function is not called
But when using https the alert function is called.
This is the first time you've mentioned an alert function - what does that do?