Minify problem

Discuss PivotX 2.0.x here. Non-PivotX related discussions go in The Drain.

Re: Minify problem

Postby mruwa1z » Mon May 13, 2013 11:23 am

Yes i did that. That's weird that only one script doesn't want to work.
If i'm asking for help, it's about this site - http://klinrap.com
mruwa1z
 
Posts: 24
Joined: Sat May 04, 2013 3:37 pm

Re: Minify problem

Postby hansfn » Mon May 13, 2013 11:46 am

Are we still discussing http://klinrap.com/? If so, I can't see that you have enabled Minify at all. If you have done something manually, we can't really help you.

PS! The slider seems to work - the one to the right in the header? It might not work in all browser because of a JS error - check the console.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Minify problem

Postby Harm10 » Mon May 13, 2013 4:14 pm

True what hans says.
You have an error in skrypty.js (false is not a function).
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Minify problem

Postby mruwa1z » Thu May 16, 2013 7:46 pm

Minify is off. I've got skrypty.js where i placed all other scripts and jquery.nivo.slider.pack.js which doesn't want to work when the minify is on or when i want to add it to skrypty.js
I don't get it, where you see the problem?
If i'm asking for help, it's about this site - http://klinrap.com
mruwa1z
 
Posts: 24
Joined: Sat May 04, 2013 3:37 pm

Re: Minify problem

Postby Harm10 » Thu May 16, 2013 9:39 pm

Look at the error console and you see the error described.
There are several ways/tools to look at this console. An easy one is by using http://chrispederick.com/work/web-developer/ for Chrome or Firefox.

I am missing the jquery lib itself. Best way to be sure it is always included is to use the hidden setting always_jquery: http://book.pivotx.net/page/app-a
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Minify problem

Postby mruwa1z » Fri May 17, 2013 9:19 am

I have deleted skrypty.js and added all other scripts one by one in the template's header. I have no idea what the hell happened but now everything works and the Minify is ON.
Code: Select all
<script src="pretty/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="pretty/js/jquery.prettyPhoto.js" type="text/javascript"></script>
<script src="slider/jquery.nivo.slider.pack.js" type="text/javascript"></script>
<script src="whcookies.js" type="text/javascript" ></script>

EDIT:
http://gtmetrix.com/reports/klinrap.com/agh3at0H it says that i should enable Keep-Alive and browser caching for minified CSS and JS files. This is the part of my .htaccess
Code: Select all
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Connection keep-alive
Header append Vary: Accept-Encoding
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
Why the minified files got 30 minutes expiration time?
Last edited by mruwa1z on Fri May 17, 2013 7:02 pm, edited 1 time in total.
If i'm asking for help, it's about this site - http://klinrap.com
mruwa1z
 
Posts: 24
Joined: Sat May 04, 2013 3:37 pm

Re: Minify problem

Postby Harm10 » Fri May 17, 2013 6:34 pm

mruwa1z wrote:Why the minified files got 30 minutes expiration time?
I have no idea. Perhaps Hans knows this?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Minify problem

Postby hansfn » Sat May 18, 2013 7:41 am

The expiration time of the minified files are controlled by Minify - see the option maxAge in includes/minify/config.php

PS! 7 days as expiration time is very long. It basically means that you have to change file names when you want your changes to reach your visitors.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Previous

Return to 2.x Discussion

Who is online

Users browsing this forum: No registered users and 3 guests