Giter Club home page Giter Club logo

cache-control's Introduction

cache-control's People

Contributors

sdgluck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

webuniverseio

cache-control's Issues

Both cases of code output is "for all responses"

Taking Apache as an example, the code output may look like this:

# for all responses
<IfModule mod_headers.c>
  Header set "Cache-Control" 'no-cache'
</IfModule>

# for single response
Header set "Cache-Control" 'no-cache'

Actually both these cases set the header for all responses.

If you want a header only to be included in a response for certain files based on file extension you could use e.g. <FilesMatch>, or preferably based on MIME type using expr.

<IfModule mod_headers.c>

  # Based on file extension:
  <FilesMatch "\.(htm|html)$">
    Header set Cache-Control "no-cache"
  </FilesMatch>

  # Based on MIME-Type:
    Header set Cache-Control "no-cache" "expr=%{CONTENT_TYPE} =~ m#text/html#i

</IfModule>

Perhaps there could be an option to choose which MIME-types or file extensions the build should apply to?

Should max-age have `=` in express?

Whey you use max-age, code that is generated in express shows following:

res.set('Cache-Control', 'max-age 86400');

shouldn't there be = instead of space, like so

res.set('Cache-Control', 'max-age=86400');

Thank you

Share/Copy links not working in Firefox

First of all, great tool! Nice job on this.

In Firefox, the "share | copy" links in the header are being overlaid by the element in the HTML called <div class="resultHeader">. So in Firefox, you can't actually use those links because they're overlaid by the element due to the margin-top: -40px in the CSS.

I'm not entirely sure why the same problem doesn't occur in Chrome, because it also seems to be overlaid in that browser, but the links still seem to work there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.