Caching

60 views
Skip to first unread message

jairogar...@gmail.com

unread,
Aug 2, 2016, 5:00:02 AM8/2/16
to Polymer
Hi, I have a problem.

Every time I make changes in the css or html not apply because the cache.

How I can prevent?

I've tried this, among other things:

         <Meta http-equiv = "Expires" content = "0">
         <Meta http-equiv = "Last-Modified" content = "0">
         <Meta http-equiv = "Cache-Control" content = "no-cache, mustrevalidate">
         <Meta http-equiv = "Pragma" content = "no-cache">

but it has not worked.

I hope you can help me.

Thank you.
J.

Eric Bidelman

unread,
Aug 2, 2016, 4:19:53 PM8/2/16
to jairogar...@gmail.com, Polymer
The easiest way is in the DevTools network panel. Check the box that disables the cache.

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/af9ab470-5500-4a94-8b72-118489e4e6ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Karl Tiedt

unread,
Aug 2, 2016, 4:23:13 PM8/2/16
to Eric Bidelman, jairogar...@gmail.com, Polymer
Worth noting, since you were unaware of this feature before, `disable cache` only applies when you have enabled the feature and the dev console is open, no need to toggle the feature on and off for normal browsing. ;)

-Karl Tiedt

jairogar...@gmail.com

unread,
Aug 2, 2016, 6:29:32 PM8/2/16
to Polymer, jairogar...@gmail.com
First of all, thank you for the answer.

To me it's ok that solution, but, and the web user to navigate every day? How I make no common user suffers this problem?

Thank to all,
J.

Karl Tiedt

unread,
Aug 2, 2016, 7:03:13 PM8/2/16
to jairogar...@gmail.com, Polymer
Ahh, that is a slightly different question. Generally that is achieved one of several ways.
  • Proper cache headers from your server
  • cache busting URLS ie: <link rel="import" href="/path/to/my/cachedfile?updated=[timestamp or datestring]">
  • directory versioning (similar to cache busting URL but the file path changes): <link rel="import" href="/v1/path/to/my/cachedfile">
  • renaming -- the more drastic of the above options: <link rel="import" href="/path/to/my/file_previouslynamed_cachedfile">

-Karl Tiedt

Follow Polymer on Google+: plus.google.com/107187849809354688692

---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages