Load iframe content with different user agent
问题 Is it possible to load an iframe with different user agent ?? Using a mobile user agent for an iframe will help my app to show mobile sites as hover popup. For example, Google shows the mobile search results page only if the user agent is from a mobile one. Is there any alternate solutions or is there any security risks involved in this idea ?? 回答1: First of all, you must create a function to change the user agent string: function setUserAgent(window, userAgent) { if (window.navigator