...

View Full Version : Can someone explain how to compress .js files?



javanewbie7
07-12-2011, 10:12 PM
OK, I work for a company that accepts donations. Currently, the donation page looks nothing like the rest of the site. So I recreated the page to look like the rest of the site. But when I do so, Chrome shows it as a "security risk". Someone looked at it and told me that it's because the .js files aren't compressed and the browser considers this a security risk.

So how do I compress the files?

VIPStephan
07-12-2011, 10:27 PM
Someone looked at it and told me that it's because the .js files aren't compressed and the browser considers this a security risk.

That doesn’t sound like correct advice to me. Never heard of a security risk because of uncompressed JS. It would help us tremendously in finding the actual issue if you gave us a link to the problematic page.

javanewbie7
07-13-2011, 09:01 PM
That doesn’t sound like correct advice to me. Never heard of a security risk because of uncompressed JS. It would help us tremendously in finding the actual issue if you gave us a link to the problematic page.

Sorry, it took so long to get back to you. Here you go. Currently it's only showing a problem in Chrome.

http://0.mk/3c90

rnd me
07-13-2011, 10:15 PM
oohhhh, i know, i know:

it's because you serve jquery.js and http://kacv.org/javascript/flash/flashobject.js (and others like hover intent) from http instead of https...

tfburges
07-13-2011, 10:45 PM
I had this same problem a while back. rnd_me is correct.

When you want users to browse securely (via https)... every single image, script, or anything that loads on the page must be under the same exact domain, or browsers will deem the page unsecure and the https will be crossed out or removed in the address bar (or a message may pop up, depending on the browser).

Like I mentioned, even an image can do this. For instance, if your secure page URL is https://www.yoursite.com... the image element must look like this:

<img src="/images/someimage.png">

Or this:

<img src="https://www.yoursite.com/images/someimage.png">

It cannot be:

<img src="http://www.yoursite.com/images/someimage.png">

javanewbie7
07-13-2011, 10:47 PM
Gotcha...makes sense. Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum