Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • sigmaaie Friend
    #177492

    Hi all,

    I have a problem with de browser cache (in Ja-Kranos Jl 1.5). In Joomla you can adjust the parameter for the server cache and also for the browser cache. But if you take out the browser cache and you change your template.css, you will have to press Ctrl+F5 to see the style changes. I have read in other forums that this is because of the browser cache and I have to cheat the browser changing the css calls in the index in the <head>. This should be an easy task, but I haven’t found the place where are the css calls in the Kranos template.

    In conclusion: I need that when a user that have the css sheets saved in his browser cache enter in my website, doesn’t need to press Ctrl+F5 to see the changes.

    Thanks

    Best Regards

    Wall Crasher Developer
    #454868

    Hi sigmaaie

    You could cusotmize 2 code block in plugins/system/jat3/jat3/core/head.php


    //re-add stylesheet to head
    foreach ($css_urls as $urls) {
    foreach ($urls as $url) {
    if (count($url) > 2) {
    $attrs = $url[2];
    $document->addStylesheet($url[1], $attrs['mime'], $attrs['media'], $attrs['attribs']);
    } else {
    $document->addStylesheet($url[1]);
    }
    }
    }

    and


    //re-add stylesheet to head
    foreach ($scrips as $url) {
    $document->addScript($url[1]);
    }

    sigmaaie Friend
    #455370

    Thank you Do Ha,

    Our knowledge of php is nothing, but the thing that we did was to put this line of code

    ( $document->addStyleSheet( ‘/templates/’ . $document->template . ‘/local/themes/css/new_css.css’ ); )

    at the end of the ” function proccess() ” in head.php.

    But the problem is that everytime we want to change css we need to change the name of the css file and this line in head.php. There is any automatic way of doing this?

    Thank you very much!!

    Ninja Lead Moderator
    #456194

    JA Template can not support auto load css file but you can add css file on template/ja_kranos/info.xml

    sigmaaie Friend
    #456306

    Thank You Ninja Lead, is a good option!

    juanalverto Friend
    #457326

    Hi! sorry i have the same problem, every time i make a change in the content of my site, in particularly pictures, no body notes the
    changes until they refresh the browser cache. I kind a dummy 😛 i didn’t understand correctly the other posts , which lines of code
    should i change in the head.php and which CSS should i add??

    Many thanks!

    Ninja Lead Moderator
    #457488

    <em>@juanalverto 325277 wrote:</em><blockquote>Hi! sorry i have the same problem, every time i make a change in the content of my site, in particularly pictures, no body notes the
    changes until they refresh the browser cache. I kind a dummy 😛 i didn’t understand correctly the other posts , which lines of code
    should i change in the head.php and which CSS should i add??

    Many thanks!</blockquote>

    Because your site is using many cache on the page: template cache, module cache, compress css and js….. you can disable cache by:

    Template cache : Go to admin->Extensions->Template Manager->Your template->Edit->Enable Development Mode(NO), Enable Template Information(No)

    Module cache : Go to admin->Extensions->Module Manager->Edit Item Module -> Advanced Options tab ->Caching(No caching)

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 4 voices, and was last updated by  Ninja Lead 12 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum