Giter VIP home page Giter VIP logo

adaptiveimages's People

Contributors

cfsimplicity avatar eppinger avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adaptiveimages's Issues

Tomcat appears not to be able to read javascript set cookies containing commas

The resolution cookie format convention inherited from the original Adaptive Images implementation separates the screen width value from the pixel ratio with a comma, e.g.

480,2

But it seems that Tomcat will not read cookies set by javascript which contain commas, which results in a fallback to testing the user agent string and delivering either the min or max configured sizes according to whether "mobile" is found.

To avoid this, we need to support cookies which use a hyphen instead to separate the two values, e.g.

480-2

The javascript to set the cookie will need changing to the following to use a hyphen instead of a comma:

<script>
document.cookie='resolution='+Math.max(screen.width,screen.height)+'-'+("devicePixelRatio" in window? devicePixelRatio: 1)+'; path=/';
</script>

Add option to log errors only

Currently logging is quite verbose. The option to just log errors would be useful to diagnose production errors in a more minimal fashion.

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.