Force users to flush their cache
Im official about to update live site after loads of testing.One common thing that happened and seemed to happen on all staging servers was cache issues, loading up old data etc.Even when i go into dev mode, flush the cache there, actual members still seem to see the issue, not everyone is savy enough to clear internet settings etc.Is there a good way to force this, via htaccess or anything?
    • 1
    PoeticJustice Its not that i want to exactly force the flush of cache, its just i noticed that since SE dropped icons for fontawesome, there has been some weird duplication icons in the activity page......... and only way to fix is flushing cache.

    Sending an email asking uses to flush your cachhe feels very awkard.

    Wasnt sure if the leverage cache control would fix something like this

    example below

    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/html "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 1 month"
    </IfModule>
    ## EXPIRES CACHING ##
    • 1
    gs My concern (as a User) is that I'd never want an app to automatically flush my browsers cache - ever. Yes, I can see where it could be useful, but it can also prevent other apps from running properly. Some Users may not mind if their cookies/etc. were removed, others might. But there are other more crucial apps (for example, I've used accounting and manufacturing apps) that are web-based that if the cache was flushed by another app, it would require rekeying data which would not be acceptable. I can see this as a User setting in a Browser (i.e. every X minutes automatically clear cache) but for a business to decide to do this automatically to all their Users is IMHO 'not cool' :) even if it's beneficial to the App. IMHO, Inter-app interference is not a good thing :( What I wish browsers could do is clear cache per Tab (ex. when I've got 10-20 Tabs open and I wish to clear some of the SE Tabs but not other SE Tabs or other websites). This often occurs when I've got 2-4 different sites open (dev, testing, staging, live, SE 4.8.13, SE 4.9.xx, etc) and I wish to clear cache for all Tabs for one of those sites but leave the others alone.
    • 0 1 vote
    • Reply
      • 1
      gs Having said all that, I located some info that may (or not) be helpful. In one link it seems this was somewhat available but has since been deprecated. Anyway, maybe there's something you'll find useful is the settings seem to be based on your PHP code, rather than forcing the browers built-in clear cache functionality.
      https://stackoverflow.com/questions/1922910/force-browser-to-clear-cache
      https://www.sitepoint.com/community/t/how-to-force-the-users-browser-to-clear-its-cache/18631/2
    • 1
    Mikel Coreclark Hei> I'm sorry if I don't fully understand your question.
    From what I know about flushing cache. there are 2 locations that you can flush.
    1 is on your admincp and the second is on your hosting server.
    Sometimes just flushing your admincp is not enough, you may need to clear your hosting server cache. This should clear most or all of the unwanted data and old updates.

    as for getting members to clear their personal PC / device cache, you wont have any control over that. you could however message or send an onsite notice to members and ask them to clear their cache ??
    Some systems like mine (windows 10) has a built in cache delete setting so when ever I exit internet my browser and cache are cleared automatically. This is a setting set as an option for most devices that I know of.

    mikel.
    • 1
    Donna I don't know of a way to force a browser to clear cache. Might be best to ask that at each browser's support forum or stackoverflow since it's not an SE issue but a browser cache issue.
    • 1
    PoeticJustice [231316,Donna] would appreciate it if you had any idea on this.... thanks in advance