Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6679837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:24:18+00:00 2026-05-26T04:24:18+00:00

I am working on a Google Custom Search implementation that uses the option to

  • 0

I am working on a Google Custom Search implementation that uses the option to load search results in an iframe within another page.

Using this URL as the iframe’s source (includes a sample query):

http://www.google.com/cse?cx=013856813593859657536:ss10an3on4k&cof=FORID:11&as_q=test

If I load this URL on a desktop browser, the custom search results are returned. If my user agent is a mobile browser (currently experiencing this issue with Safari iOS 4.3, and Android) I get an empty page with a Javascript search box. This causes my users to have to enter search terms twice. Here is a screenshot of the returned page:

http://csuh.tv/0s032D1S3S0F3X161i16

Google seems to be user-agent sniffing (boo) in this regard, and borking mobile results. I need to either (1) fix this using some custom-search API options I have not found in their documentation or (2) prevent them from sniffing and screwing up the mobile results.


UPDATE: I solved this by presenting mobile clients with a search box that simply submitted to the regular Google search (i.e. http://google.com/search) with a site: term. The solution below works as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:24:19+00:00Added an answer on May 26, 2026 at 4:24 am

    When you type in the search box and hit enter, you get a different URL. You could probably change the iframe’s src to the below URL and it should work:

    http://www.google.com/cse?cx=013856813593859657536:ss10an3on4k&cof=FORID:11&as_q=test#gsc.tab=0&gsc.q=test

    As a last resort, and assuming it is in accordance with Google’s TOS, you could have the iframe point to a page on your server that acts as a proxy to fetch the result from Google and outputs the resulting HTML. That way you have complete control over the user agent.

    www.mywebsite.com/mysearchproxy.php?search=test
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am using Custom Google search in my web page Code: <div id=cse style=width: 100%;>Loading</div>
The website I'm working on http://bit.ly/aokA4I has a Google custom search form on the
I am working on a web page that now needs to be Google-optimized. Currently
I am using Google Custom Search Engine with their new auto-completion feature. I want
I'm working on a GWT app that's using Google Maps. I'm trying to add
First the problem: I'm working on the application that uses multiple FragmentLists within a
I just started working using Google Maps API yesterday, and trying to set up
I'm working on a Google App Engine program that will require some basic spell
I'm currently working on a Google Maps project and am implementing a search function.
I'm making a site in php and I'm using google custon search for my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.