Git Product home page Git Product logo

mimetypeicons-nodejs's People

Contributors

dependabot[bot] avatar giovanigenerali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ginotria thayider

mimetypeicons-nodejs's Issues

temp/perm redirect

Reproducible steps:

  1. Go to https://mimetypeicons-wgenial.rhcloud.com/application/pdf?size=scalable

Expected behavior:
Get a permanent redirect (301) to https://mimetypeicons-wgenial.rhcloud.com/mimetypes-icons/scalable/application-pdf.svg

Actual behavior:
Get a temporary redirect (302) to https://mimetypeicons-wgenial.rhcloud.com/mimetypes-icons/scalable/application-pdf.svg

This saves a RTT if the icon is already cached. The browser refuses to show the icon before and during the request in case of a 301; just to be sure the original URL does not suddenly points somewhere else.

A 302 tell the browser it will not suddenly point somewhere else, and so the browser may cache this entire response.

Plan to keep adding icons

The linked faenza-icon-theme is no longer on google code. This raises the question if there any plans to keep adding icons for new mime types.

perm/temp redirect

Reproducible steps:

  1. Go to https://mimetypeicons-wgenial.rhcloud.com/something.webp

Expected behavior:
Get a temporary redirect (302)

Actual behavior:
Get a permanent redirect (301)

Unknown types should not get a permanent redirect to the default icon. And this can be considered true too if a available size is missing, eg: request for https://peicons-wgenial.rhcloud.com/doc?size=4

Browsers might honor the 301 redirect forever. And it will be hard to convince them otherwise regardless if we finally have new icons for those new sweet mime-types. A solution would be to issue a 302 in case the direct might change in the future.

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.