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

  • SEARCH
  • Home
  • 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 7750029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:11:05+00:00 2026-06-01T11:11:05+00:00

I want to load an external website in an iframe. But faced issues due

  • 0

I want to load an external website in an iframe. But faced issues due to Same-Origin-Same-domain policy. So for solving this I used the proxy solution in which we send our request to a proxy file (I wrote in java) and then it requests the server and return back the response. This is working perfectly fine.

But using this method all the pages are not correctly loaded into my iframe.
Currently I am working on localhost. The problem i am facing is there are some errors in fetching the page like:-
On fetching http://www.google.com i got these errors:-

GET http://localhost:8080/images/srpr/logo1w.png 404 (Not Found)

a.html:101 GET http://localhost:8080/extern_js/f/CgJlbhICaW4gACswRTgALCswWjgALCswDjgALCswFzgALCswPDgALCswUTgALCswCjgAmgICaGUsKzCYATgALCswFjgALCswGTgBLCswQTgALCswTTgALCswTjgALCswVDgALCswaTgALCswkAE4ACwrMJIBOAAsKzDVATgALCsw2AE4ACwrMBg4ACwrMCY4ACyAAlCQAnA/Q4V9Cbp7fuo.js 404 (Not Found)

These errors are coming because relative path has been specified in the webpage i am fetching (I guess). Am I right? If I am then how to correct these things so that such errors can be corrected.

After searching on net, I got a site which does this perfectly. Please checkout http://optimizely.com

  • 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-06-01T11:11:06+00:00Added an answer on June 1, 2026 at 11:11 am

    The issue appears to be that if a site uses relative HREFs (relative to the domain/path that the site was loaded from), then your solution will cause problems because you’ve changed the apparent load domain/path to something else.

    One possibility is for you to inject a tag into the right place in the page (in the <head> section) like this to properly set the base href:

    <base href="http://www.google.com">
    

    See this article for more info: http://www.drostdesigns.com/base-href-tag/

    This solution is not foolproof though because if the site is already using a <base href="xxx"> tag, your may cause problems and if javascript code is doing manipulations based on the loaded domain/path, the base href won’t fix that. Whether those issues matter or not will depend upon the particular page.

    If the base href solution doesn’t work, you might have to proxy all the other requests for resources too (images, ajax calls, etc…) so that everything destined for the other host, but requested from you is proxied appropriately. This would be more foolproof.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to load defined folders into my website from same system, now I
I want to load external javascript file but I can't use AJAX requests because
I want to load external content (from another domain) and simulate navigation, doing things
I want to load external websites inside div and make it a bit smaller
I want to load an external jQuery player into my div #player . I
I want to copy the entire source code of an external website to a
I'm doing some file validation and want to load an UploadedFile into an external
I have a flash movie instance name headArea I want to load a external
I want to load an image from an external folder of my system to
I want to have a static website uploaded on an external server that will

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.