Solved

Load Google.com inside an iframe

Posted on 2014-01-14
9
1,327 Views
Last Modified: 2014-02-07
is it possible?
0
Comment
Question by:COwebmaster
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 167 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 333 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 52

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 333 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 52

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Read about why website design really matters in today's demanding market.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

758 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now