Skip to main content
georgess45619724
Participant
September 30, 2017
Question

Ctrl F5 doesn't erase the cache

  • September 30, 2017
  • 3 replies
  • 692 views

Hi all,

I'm using a quite old version of Dreamweaver (Dreamweaver MX 6.1) but it's enough for me. Till I switched to W10 no probleme. But now Ctrl F5 doesnt erase the  cache. Visitors need to use Ccleaner to up date my pages.

My question : does it exist a line (code) to be inserted in the dreamweaver programme that erases the computer cache of visitors (at least the files of Dreamweaver) when the website opens ?

Thanks

This topic has been closed for replies.

3 replies

Jon Fritz
Community Expert
Community Expert
October 2, 2017

I use the following, added to any links that need to be updated continuously, mainly PDF files where changing the name of the file isn't an option (which is the best way to avoid caching). It seems to defeat Chrome's latest caching behavior in all of my testing...

onClick="this.href=this.href.split('?')[0]+'?'+new Date().getTime()"

The final link code would look like...

<a href="calendar_2017.pdf" onClick="this.href=this.href.split('?')[0]+'?'+new Date().getTime()">

The code adds a unique query string onto the end of any link it's attached to when clicked. That has the effect, in the vast majority of browsers, of tricking the browser into downloading a new copy on each click. Because the code uses the href already in the link tag, it will continue to work as normal if .js is turned off in the viewer's browser, though cache would kick in normally as well.

BenPleysier
Community Expert
Community Expert
October 1, 2017

Adding to Nancy's reply, Chrome has a relentless caching system, a feature that other browsers will undoubtedly follow in the interests of greater efficiency.

I feel that we, as developers, need to accommodate the sticky cache by using cache busting techniques For more info, Google Cache Busting

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Nancy OShea
Community Expert
Community Expert
October 1, 2017

Some browser's like Chrome have a sticky cache or browsing data history.  The only reliable way to clear the cache is through your browser settings.

Clear cache and cookies - Computer - Google Account Help

Nancy

Nancy O'Shea— Product User & Community Expert