Yes, you will incur a performance penalty as well as increased bandwidth utilization for a security tradeoff.
It's up to you to decide if that's worth it for you. If you're ok with customers not seeing the secured icon in the address bar, the AJAX approach you linked is an OK solution. Just please make sure sensitive data does in fact go through HTTPS

Regarding images not rendering on HTTPS, are they living outside of the /img/ directory? We definitely allow images to be served from either protocol. As an example,
https://demo.broadleafcommerce.org/heat ... ternal.pngNote line 25 in applicationContext-security.xml:
Code: Select all
<sec:http pattern="/img/**" security="none" />
If you are trying to serve a resource from outside of the directories that have already specified in the XML file, you will need to add a similar declaration.
You will need a parallel declaration in applicationContext.xml. Take a look at line 49:
Code: Select all
<mvc:resources order="-10" location="/img/" mapping="/img/**" />