?
Solved

Load Google.com inside an iframe

Posted on 2014-01-14
9
Medium Priority
?
1,574 Views
Last Modified: 2014-02-07
is it possible?
0
Comment
Question by:COwebmaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 668 total points
ID: 39781344
What you want is google custom search https://developers.google.com/custom-search/

This will allow you to load the results in a div.
0
 
LVL 14

Assisted Solution

by:quizwedge
quizwedge earned 1332 total points
ID: 39781497
I agree with Scott that custom search is what you want.

For security and/or to prevent competitors from using their main search page, Google only allows Google to iframe the google.com using x-frame-options:SAMEORIGIN (https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options?redirectlocale=en-US&redirectslug=The_X-FRAME-OPTIONS_response_header)

The only way I've seen around this is to set up a reverse proxy. Seems that custom search would be the more stable and easier solution.
0
 
LVL 6

Expert Comment

by:Mahesh Bhutkar
ID: 39781544
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 

Author Comment

by:COwebmaster
ID: 39782600
i want to load in http://plus.google.com into an iframe, not results from any query.  Is that possible or do they prevent from doing that?
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39782639
Are you asking how to do an iframe or if it is within their TOS?  

You may wan to read deeper but it looks like as long as you are not selling any ads around the content it might be ok http://www.google.com/+/policy/embedded-content.html
0
 
LVL 14

Accepted Solution

by:
quizwedge earned 1332 total points
ID: 39782864
https://plus.google.com also has x-frame-options:SAMEORIGIN.

One way to check is to load the site in Chrome with the developer tools open. (View -> Developer -> Developer Tools) Click on the network tab and look for the page. It should be the first one, in this case plus.google.com. Click on that page and scroll down to where it says "Response Headers". Under Response Headers you'll see "x-frame-options". If it says SAMEORIGIN, that means you have to be the same domain to iframe it.

Note, you have to have the Developer Tools open before you load the page (or open them and reload the page.) The network tab only shows items loaded after you've opened the developer tools.
0
 

Author Comment

by:COwebmaster
ID: 39843396
so there is no way to open any google sites within an iframe I gather, yes?
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39843454
Yes, there is no way to place google in an iframe.  Use google custom search.  That is what it is meant for.
0
 

Author Closing Comment

by:COwebmaster
ID: 39843459
Thanks!
0

Featured Post

Tutorial: Introduction to Managing a Linux Server

In this tutorial on systemd, we will explore:
-OS/Distro Adoption
-chkconfig and Other Legacy Commands
-Summary and Key Commands

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question