Subscribe via
Welcome, Guest. Please login or register.
Did you miss your activation email?
 OMNINOGGIN ForumPlugin SupportWP MinifySerious issue with placement of JS code
Pages: [1]
Print
Author Topic: Serious issue with placement of JS code  (Read 756 times)
Pins
Newbie
*
Posts: 2


View Profile Email
« on: January 28, 2010, 09:59:42 PM »

Great plugin. I am really looking forward to watching it progress. One big thing that I think you should look at is how your plugin embeds code when some css is excluded. Example

<link rel='stylesheet' href='/wp-minify/min/>
<script type='text/javascript' src='minify/min/</script>
<link rel='stylesheet' href='/excluded css>

So what the issue is is that you embed css then js then css that was excluded. This is an issue because nothing will load parallel to that js file and it stands to believe it would be a large file. If you could make it so it loads minify css, then excluded css, then minfy js, then excluded js... we'd all be happy campers.

Additionally I read the post about identifying what js goes in the foot and I think thats a great idea too.
Logged

Thaya
Administrator
Sr. Member
*****
Posts: 400



View Profile WWW Email
« Reply #1 on: February 17, 2010, 01:00:16 AM »

Hmm... I'm not sure how this should be done. Right now, WP Minify doesn't touch the excluded CSS entries at all so it has no control over where the excluded entries land.

JS in the footer should be in the next big version (0.7.0).
Logged

Pins
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: February 17, 2010, 08:49:01 AM »

I think just add an option for end of header where you search out the </head> tage
Logged

Thaya
Administrator
Sr. Member
*****
Posts: 400



View Profile WWW Email
« Reply #3 on: March 10, 2010, 11:29:10 AM »

Hey I got an idea. What if I make the plugin drop the JS code wherever it sees some sort of special tag?

Let's say I make the special tag something like:
Code: [Select]
<!-- WP-Minify JavaScript Location -->
?
Logged

Thaya
Administrator
Sr. Member
*****
Posts: 400



View Profile WWW Email
« Reply #4 on: April 26, 2010, 11:50:05 PM »

This feature was released with version 0.8.0 with special tag:

Code: [Select]
<!-- WP-Minify JS -->
and

Code: [Select]
<!-- WP-Minify CSS -->
Logged

Pages: [1]
Print
Jump to: