Tag archives for refresh

CakePower Assets Version
prevent undesired assets caching!

CakePOWER allows you to add a virtual version name to all your assets:

// app/Config/core.php
Configure::write('Asset.version', '1.0.3');

Every assets url created through CakePHP helpers will be postfixed with that version string:

<script src="/js/foo.js?v=1.0.3" />
<link href="/css/foo.css?v=1.0.3" />

You should manually change version’s string whenever you upload new version of your assets forcing all clients to download new copy of libraries, stylesheets, images, etc!

Continue reading »

Posted in CakePHP, CakePOWER | Leave a comment

CakePHP AuthComponent – refresh user data

In my authentication based project I have an Account Settings panel who allow authenticated user to change some profile data like e-mail, language and country.

All things works fine with CakePHP Model’s save() method but AuthComponent still provide old values because it stores user’s data into CakePHP SessionComponent at login time.

The problem is that when an authenticated user updates it’s profile then he need to logout then login to update session’s data.

Continue reading »

Posted in CakePHP, CakePOWER, Tips & Tricks | Leave a comment

Backbone: how to refresh a Router action

There is a little bug in BackboneJS Router’s logic: If you try to trigger the same route twice (or more) then linked action is triggered only once.

In this simple tutorial I tell you why this behavior happens and I propose a simple workaround to let things works. I also set up a jsFiddle example to demonstrate how this bug influence your app and the simple workaround to kill it.

Continue reading »

Posted in BackboneJS, Tips & Tricks | 4 Comments

how to Scroll Top a List in Sencha Touch

Let me say I have the view named “tagFilteredView” who contain a simple list of items. Depending on the tag I want to filter my items by the list may show 3 to hundreds or results. The list is always the same.

Maybe I found a little bug in Sencha Touch UI when you perform these actions:

  1. render a List with a lot of data inside
  2. scroll down the list
  3. update the List’s Store with a small set of data that not require to scroll

In this case you are not able to see data and you are not able to scroll up the list… but there is a simple solution! Continue reading »

Posted in Tips & Tricks | 4 Comments

Swedish Greys - a WordPress theme from Nordic Themepark.