]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added a fallback value for useragent (#20172)
authorMatti Tahvonen <matti@vaadin.com>
Mon, 22 Aug 2016 15:30:59 +0000 (18:30 +0300)
committerVaadin Code Review <review@vaadin.com>
Tue, 30 Aug 2016 12:24:25 +0000 (12:24 +0000)
Without this change, some browsers, like GoogleBot, don't properly render the page.
Instead of weird JS exception (and hit to server with 404) we should at least try
to render the app with all browser. As webikit/chromium based browsers are
nowadays most popular, falling back to "safari" permutation.

Change-Id: I4275110962432b2552d51715a86a8e815fe539ad

client/src/main/resources/com/vaadin/Vaadin.gwt.xml

index 739225e5948d8399621c3873e0838edfa332ae54..20951561b79def128781b6df76a04d3e50466b39 100644 (file)
@@ -57,6 +57,9 @@
             <when-property-is name="user.agent" value="gecko1_8" />
         </none>
     </set-property>
+    
+    <!-- If no proper user agent is found, at least try some, e.g. with crawlers -->
+    <set-property-fallback name="user.agent" value="safari" />
 
     <!-- Fall through to this rule when the browser doesn't support pointer 
         event -->