Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-12-2011, 10:12 PM   PM User | #1
javanewbie7
Regular Coder

 
Join Date: Oct 2010
Posts: 121
Thanks: 25
Thanked 0 Times in 0 Posts
javanewbie7 is an unknown quantity at this point
Can someone explain how to compress .js files?

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?
javanewbie7 is offline   Reply With Quote
Old 07-12-2011, 10:27 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,615
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by javanewbie7 View Post
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.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Users who have thanked VIPStephan for this post:
javanewbie7 (07-13-2011)
Old 07-13-2011, 09:01 PM   PM User | #3
javanewbie7
Regular Coder

 
Join Date: Oct 2010
Posts: 121
Thanks: 25
Thanked 0 Times in 0 Posts
javanewbie7 is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
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
javanewbie7 is offline   Reply With Quote
Old 07-13-2011, 10:15 PM   PM User | #4
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,469
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
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...
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is offline   Reply With Quote
Users who have thanked rnd me for this post:
javanewbie7 (07-13-2011)
Old 07-13-2011, 10:45 PM   PM User | #5
tfburges
Regular Coder

 
Join Date: May 2009
Posts: 425
Thanks: 3
Thanked 62 Times in 61 Posts
tfburges is an unknown quantity at this point
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:
Code:
<img src="/images/someimage.png">
Or this:
Code:
<img src="https://www.yoursite.com/images/someimage.png">
It cannot be:
Code:
<img src="http://www.yoursite.com/images/someimage.png">
__________________
I'm the founder of Loggur, a place to build and share web apps focused on maximizing efficiency and productivity:
http://www.loggur.com

My personal site and blog:
http://www.tfburgess.com
tfburges is offline   Reply With Quote
Users who have thanked tfburges for this post:
javanewbie7 (07-13-2011)
Old 07-13-2011, 10:47 PM   PM User | #6
javanewbie7
Regular Coder

 
Join Date: Oct 2010
Posts: 121
Thanks: 25
Thanked 0 Times in 0 Posts
javanewbie7 is an unknown quantity at this point
Gotcha...makes sense. Thanks!
javanewbie7 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:27 AM.


Advertisement
Log in to turn off these ads.