1 (edited by dimkalinux 2011-08-08 07:40)

Topic: [extension release] Fancy JavaScript/CSS cacher

It can merge CSS/JS files and minification, and move JS to the bottom of page.
Please, check that cache dir in extension directory have 0777 rights (for write).
You can change default options of ext in FORUM » Administration » Settings » Features in Fancy JS/CSS Cacher Options section.

PunBB 1.3
fancy_js_cache.tar.gz — версия 1.1

PunBB 1.4
fancy_js_cache.zip

Re: [extension release] Fancy JavaScript/CSS cacher

oh cool! i just wasted time with my one.  surely try your's one!

thanks

Re: [extension release] Fancy JavaScript/CSS cacher

one thing! yslow suggests to put css in head section.

Re: [extension release] Fancy JavaScript/CSS cacher

Nice, Thanks man.

MyFootballCafe.com  is Now Online!

Re: [extension release] Fancy JavaScript/CSS cacher

rajuru wrote:

one thing! yslow suggests to put css in head section.

Yes, i know. In punbb CSS always in head, i just move JS in bottom of the page.

Re: [extension release] Fancy JavaScript/CSS cacher

good stuff
so is it advisable for everyone to use this ?
sounds like an important ext for speed....

Re: [extension release] Fancy JavaScript/CSS cacher

Ext usefull if you have > 2 extensions with own JS/CSS files.

Re: [extension release] Fancy JavaScript/CSS cacher

it highly improves page loading when I move the js file at bottom. but certain things do not work as they must be loaded header section. so need a exception list. it may be a list of files that should not be moved to bottom.

so if possible, please add this feature.

Re: [extension release] Fancy JavaScript/CSS cacher

Ok, i`m working on this feature.

10

Re: [extension release] Fancy JavaScript/CSS cacher

Any updates on this?

Re: [extension release] Fancy JavaScript/CSS cacher

U can find latest version on GIT - http://github.com/dimkalinux/fancy_js_cache
But «exception feature» not yet released.

Re: [extension release] Fancy JavaScript/CSS cacher

a quick french translation smile

<?php

if (!defined('FORUM')) die();

$lang_fancy_js_cache = array(
    'Name'            => 'Param&egrave;tres pour Fancy JS/CSS Cacher',
    'Enable JS Minify label'    => 'Minify le cache JavaScript (PHP 5 n&eacute;cessaire)',
    'Enable CSS Minify label'    => 'Minify le cache CSS (PHP 5 n&eacute;cessaire)',
    'Input CSS CDN' => 'URL pour les fichier CSS en cache',
    'Input JS CDN' => 'URL pour les fichier JS en cache',
    'Enable JS Move Bottom label' => 'D&eacute;place les scripts JS en fin de page',
    'Enable JS'        => 'JavaScript',
    'Enable JS label'    => 'Active le cache et fusionne le Javascript',
    'Enable CSS'        => 'CSS',
    'Enable CSS label'    => 'Active le cache et fusionne les CSS',
);

?>

13 (edited by dimkalinux 2010-05-03 14:42)

Re: [extension release] Fancy JavaScript/CSS cacher

Changelog

  • added compability with ek_chatlite и ajax_post_edit.

  • added ability dont cache inline-javascript

  • rewriten engine

  • added French localization

Beta version for test
fancy_js_cache_test_0.9.7.tar.gz — version 0.9.7
Development and code in GitHub.

Re: [extension release] Fancy JavaScript/CSS cacher

Current stable version - 1.0.1

fancy_js_cache.tar.gz — version 1.0.1

Re: [extension release] Fancy JavaScript/CSS cacher

Thank you for this useful extension.  smile

In the manifest file, line 126, I have modified

<span><a href="'.forum_link('/misc.php?action=fancy_js_cache_clear&amp;csrf_token=$1'

in

<span><a href="'.forum_link('misc.php?action=fancy_js_cache_clear&amp;csrf_token=$1'

because there was a double / when I click on “clear cache”.

Re: [extension release] Fancy JavaScript/CSS cacher

Fixed in 1.0.3.
Thanks for helping.

17

Re: [extension release] Fancy JavaScript/CSS cacher

OK I have detected and exprimented a (painful) problem with this extension.

The cache seem to regenarate sometimes. "Sometimes" mean I don't know why the cache regenerate.

- On the portal by daris, when I change a panel, or when I create/cancel a panel, the cache regenerate and it destroys the CSS of the page. And it changes it on each navigator.

This create a big problem because the CSS must be changed on different caches for each navigator. 

- Last friday, I woke up and all my portal was destroyed but I didn't changed anything on my code for days. It seems that the caches regenerated "alone" I don't know why.

Very very strange.

Would you have some explanation/have youeard before about such phenomenon ?

Is Fancy-JS-Cache necessary to create the portal by Daris ? Because it is a big problem if we have to change many different CSS caches each time we want to edit our portal panels... Don't you think ?

Thank you.

Re: [extension release] Fancy JavaScript/CSS cacher

Cache auto regenerated only when changed CSS files or/and CSS inline.
I will be test compability portal Daris with JS cacher on this week.

Why u think CSS must be separated for different browsers? I think its must be separated only for IE/non IE browsers.

19

Re: [extension release] Fancy JavaScript/CSS cacher

I don't "think" they "must be" sparated. I experimented that they ARE separated. When I changed the CSS of the cache of the firefox page, it didn't changed anything on safari, IEs and chrome. There was different files for each of these navigators

Re: [extension release] Fancy JavaScript/CSS cacher

Ok, it different files but how you it included in page separatly for different browsers?

Re: [extension release] Fancy JavaScript/CSS cacher

Ok, how my ext work

1) Grab all CSS files from page and compute hashsum of it contents - got hashsum
2) Check in cachedir file with name as this hashsum
3) if file exists - include it to page, if not exists - create it and include in page

if u change content of CSS file or changed number of CSS files - hashsum changed and ext create new cached files.

22

Re: [extension release] Fancy JavaScript/CSS cacher

Thank you for answering fastly !

I'm sorry but I don't know what "hashsum" is.

The problem is that I didn't touch my code when caches regenerated.

Only touching a panel for instance change the caches. But it also changed without any change neither on the portal nor on the code.

What would happen if I uninstall this extension : Will my portal disapear or be broken ?

It's a risky extension, for any change or regeneration of the caches can have important consequences on the website, obliging important maintenance work...

Thank you anyway for your work.

Re: [extension release] Fancy JavaScript/CSS cacher

You can safe uninstall or disable fancy_js_cacher.

24

Re: [extension release] Fancy JavaScript/CSS cacher

Ok thank you for this information.

Re: [extension release] Fancy JavaScript/CSS cacher

Version 1.1

  • Fixed errors with some pre-minified css-files

  • Fixed errors with some css-files with Microsoft filters