homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Content Management
Forum Library, Charter, Moderators: ergophobe

Content Management Forum

can you force a browser refresh?

 11:47 pm on Nov 13, 2013 (gmt 0)

I have a case where announcements can be posted in A module on a joomla site. Publishing the module then publishes the announcement.

The problem is that if the users browser is reading from a cache then they don't see the announcement.

Is there a way to force a browser cache refresh only when an announcement is published.. I'm thinking I could add JavaScript to the announcement module to do that





 12:58 am on Nov 14, 2013 (gmt 0)

I don't think you can do that with Javascript - that would be too much power over the client for a page to have. Things you can do that come to mind right away

1. Ajax refresh various elements of the page
2. set HTTP headers to stop caching
3. Add a query string with a hash so the browser has to fetch the page
4. meta tag no cache
5. a meta refresh if you want to go nuclear on them.


 1:56 am on Nov 14, 2013 (gmt 0)

Isn't this one of the things you can explicitly block in Firefox? So it can be done-- but doing it will probably not put you among the angels.


 3:51 am on Nov 14, 2013 (gmt 0)

Not put you among the angels?

The only downsides are
- not cached so longer pageload for the client
- not cached, so more work for the server

But in the grand scheme those are not that big a deal unless this appears on tons of pages in a sidebar and you're going to go preventing caching sitewide.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Content Management
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved