homepage Welcome to WebmasterWorld Guest from 54.242.200.172
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / Content Management
Forum Library, Charter, Moderators: ergophobe

Content Management Forum

    
can you force a browser refresh?
cmendla




msg:4623107
 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

Thanks

Chris

 

ergophobe




msg:4623124
 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.

lucy24




msg:4623133
 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.

ergophobe




msg:4623142
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved