I am trying to find a better way to include the following in my head in rails 3:
<!--[if IE]><script language="javascript" type="text/javascript" src="/javascripts/excanvas.min.js"></script><![endif]-->
As you can see, I just want this javascript file to be available in IE ... so maybe I shouldn't do it that way at all ... I'm open to suggestions.
I use this to specify default javascript files to include:
config.action_view.javascript_expansions [: defaults] =% w (jquery rails jquery-ui jquery.flot)
In any case, can I specify this default excanvas.js only if the user uses IE?
What is the best way to do this?
Thank!
The best way is how you do it, i.e.:
<%= javascript_include_tag :defaults %> <!--[if IE]><%= javascript_include_tag "excanvas.min" %><![endif]-->
, useragent , - CSS/JS IE/ IE. - User-agent, , IE excanvas, :defaults. , , IE , , IE.
excanvas
:defaults
Source: https://habr.com/ru/post/1769791/More articles:Loading a large image in parts in a Timage component - image-processingDelete a unique constant in a table column without knowing the name of the constraint - sqlExamples of OpenNETCF.Net.Networkinformation - requesting Wi-Fi information - c #Flex 4. Transferring data from the main application to the user component - flexpostgres spatial indexing - sqlhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1769792/maven-how-to-add-files-to-the-root-inside-an-ear-with-maven-ear-plugin&usg=ALkJrhgABWfCkch_XOig90HUlPo7b54TBQCucumber: How to write fragment / step definitions in PHP? - ruby | fooobar.comShould I use open source software in my commercial application? - open-sourcePrinting columns using awk or cut? - scriptingHow can I get PHPUnit + Selenium to work faster? - performanceAll Articles