joomlaurl-rewritingjoomla3.3

How to append a random number as parameter in URL


I have a problem with caching in my site and I think it comes from the Template I am using (JSN GRUVE). Caching is still working even after disabling it in my Joomla settings ( Global configuration, System plugin , Modules )

One way I thought I could get around this problem is by rewriting the URL and adding a random number or session id at the end of it, so I would force the page to be loaded and not be displayed from cache.

Is there any way to do this?

Thanks


Solution

  • Using JQuery i have managed to assign a custom string at the end of each link on the Main Menu of the site.

    jQuery( document ).ready(function() {
      jQuery('.menu-mainmenu').find('a').each(function() {
        jQuery(this).attr('href',jQuery(this).attr('href')+'?zId='+Math.random());
      });
    });