redbishop — 2013-07-05T03:31:00-04:00 — #1
Has anyone used the polyfill Respond.js in their website?
According to the documentation on the GitHub website, under “How's it work”, I need to configure the css files' caching in order to avoid a re-request going to the server. I believe this is only relevant for IE users?
I have no idea what I'm supposed to do. Could someone please enlighten me?
Thank you very much!!!
fretburner — 2013-07-05T12:34:24-04:00 — #2
You can configure caching for your css files by editing your .htaccess file in the root directory of your site.
The commands you need to add would be something like this:
ExpiresByType text/css "access plus 1 year"
You might want to take a look at this sample .htaccess file to see what other caching settings can be used.
pullo — 2013-07-05T12:59:51-04:00 — #3
I used respond.js on a couple of projects, as I found it to be considerably less buggy than css3-mediaqueries-js.
It has always worked out of the box for me.
I always thought (though I might be wrong) that browsers cache CSS stylesheets by default.
I understood the "How to use" section to mean "ensure that you have taken no steps to counteract this (for example by appending a timestamp to your css files as a parameter)".
fretburner — 2013-07-05T13:29:39-04:00 — #4
Good point.. I believe CSS is cached by default, but I've no idea for how long. I've just done a quick search but it seems difficult to find any concrete figures, and I imagine it will vary between browsers.
redbishop — 2013-07-08T05:28:26-04:00 — #5
Hi fretburner & Pullo
thank you for the info!
@ fretburner, I'll check out the link!