Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other respond.js for CSS media queries

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #38125
    almcrorie
    Participant

    went to github, and checked out respond.js, demo worked fine on IE8, no problem with Chrome or FF.

    downloaded the code, ran test html on IE8, no go, media queries do not work with IE8, the html test code just does not work the same as the demo code on the same pc.

    anyone get respond.js test html included in the download working in IE8?? what is different between the online demo code and the download html test code?

    would like to revamp the web site I look after for the newer smaller screen sizes but running into this problem with IE8. IE8 is the most popular browser version used on this website, so anything like this needs to work with IE8.

    Al

    #103097
    almcrorie
    Participant

    apparently respond.js must be run on a web server, it will not run locally, this was noted in the github documentation

    Al

    #139721
    Kushal Jayswal
    Participant

    I have tried this and earlier it was working but after some days when I checked again, it’s stopped working and giving error.

    #139755

    @almcrorie, you’re absolutely correct. The statement from the documentation delcaring this follows:

    > Due to security restrictions, some browsers may not allow this script to work on file:// urls (because it uses xmlHttpRequest). Run it on a web server.

    That being said, there are many options for developers locally. You could run MAMP, WAMP, enable IIS on your Windows machine, run the Python Simple Server, or even the built-in web server that ships with PHP.

    If non of those options sound appealing, you can simply permit your browser to allow scripts on the file protocol. In Chrome, you can run the browser with the –allow-file-access-from-files flag. Internet Explorer, traditionally, would allow file access from the file protocol when you used ActiveXObject to issue the request, but not for XMLHttpRequest. jQuery would use ActiveXObject when it was present, but this isn’t the case with IE10, I don’t believe.

    Another alternative is to use a different solution: Scott Jehl makes reference to one in the bottom of his README –[css3.mediaqueries.js](https://code.google.com/p/css3-mediaqueries-js/).

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Other’ is closed to new topics and replies.