ASP.net not generating javascript for some User Agents

后端 未结 6 1307
一整个雨季
一整个雨季 2020-12-20 22:26

********************Edit 2********************** I figured out the problem... But I don\'t like the implications. I was testing our iPhone targeted mobile application earli

6条回答
  •  余生分开走
    2020-12-20 23:07

    The problem is the default way ASP.net treats unknown browsers... such as the iPhone. Even though it would be nice to assume unknown browsers could use javascript... you can specify what capabilities that a browser has in the section of web.config or machine.config.

    Check out http://slingfive.com/pages/code/browserCaps/ for an updated browsercaps config file for asp.net

    Here is an example of a case to match GECKO Based Browsers (Netscape 6+, Mozilla/Firefox, ...)

    
                    browser=Gecko
                    
                        
                            type=${type}
                        
                         
                            type=Mozilla
                        
                    
                    frames=true
                    tables=true
                    cookies=true
                    javascript=true
                    javaapplets=true
                    ecmascriptversion=1.5
                    w3cdomversion=1.0
                    css1=true
                    css2=true
                    xml=true
                    tagwriter=System.Web.UI.HtmlTextWriter
                    
                        version=${version}
                        majorversion=0${major}
                        minorversion=0${minor}
                        
                            beta=true
                        
                    
                
    

提交回复
热议问题