Rails 3 Conditional Inclusion of Javascript files

后端 未结 1 616
萌比男神i
萌比男神i 2021-01-14 07:07

I\'m trying to figure out the best way to include the following in my head in rails 3:


Conditional comments, rather than serverside useragent scraping, are the best way to go about serving additional CSS/JS assets to IE/specific versions of IE. Some proxy servers modify the User-agent header which means that some IE users might not have the excanvas file inserted into the :defaults expansion. Inserting it like this means all IE users will be served the file, not just those where the user-agent matches a typical IE useragent.

0 讨论(0)
提交回复
热议问题