1

Does anyone know of a solution to make Chrome and IE pass the query string attached to an Iframe src? My Iframe is supposed to load a page based on the parameter passed in the src but it looks like that parameter is omitted. It works fine in Firefox, also works in both Chrome and IE if I copy the src url and browse to it directly. It just doesn't work from the iframe's src:

<iframe id="tln-space" class="tln-space" src="http://sub.domain.co.za?uid=51cf83bf-44fe-4b10-bce7-051be48e8fbb" width="100%" frameborder="0" scrolling="yes" style="height: 600px;"></iframe>

In the above, it looks like uid is not being passed.

And the main domain and the iframe domain are not the same but both using http.

Thanks in advance.

Morgs

Morgs
  • 1,558
  • 3
  • 19
  • 34
  • where do you want to use the iframe – Sarthak Kuchhal Sep 15 '20 at 11:36
  • @SarthakKuchhal the iframe is part of a website – Morgs Sep 15 '20 at 11:38
  • the reasons may be.. mixed content ( the url in iframe is HTTP) and your site may be HTTPS. or the iframe url must not be allowing using their site on some other URL – Sarthak Kuchhal Sep 15 '20 at 11:43
  • @SarthakKuchhal they're both using `http` and the iframe does load some content but it loads content that would load if no uid is specified whereas I've specified the uid. And the iframe does load fine in Firefox, just IE and Chrome – Morgs Sep 15 '20 at 11:46
  • https://prnt.sc/uhmgox for me its not even loading in normal url bar. – Sarthak Kuchhal Sep 15 '20 at 11:51
  • Please check whether you are getting any error or warning messages in the the console of the browser? It can be possible that due to some security settings parameter not get passed. Just for testing purposes, can you try to lower down the security settings of the IE browser and check whether it helps to fix the issue or not. you can try to check on your side and let us know about your test results. It may help to narrow down the issue. – Deepak-MSFT Sep 16 '20 at 03:21
  • 1
    @Morgs did you get a solution for this problem? cuz even i am facing the same issue and any help would be appreciated – FAIZAN Jan 22 '21 at 13:25
  • @FAIZANAHMEDKHAN, the solution was to disable the SameSite setting which is automatically turned on. If the samesite is on, the iframe site cannot load cookies from a url that is different from the parent url. In my case it was made easier because my users are managed by a Group policy. Here's how you can disabled the SameSite setting that browsers recently introduced: `https://stackoverflow.com/questions/59030096/how-to-disable-same-site-policy-in-chrome` – Morgs Feb 02 '21 at 15:21
  • Modern browser are very picky about this. For me it worked when both the main URL and iframe URL were https and used the same domain. Since I needed to pass a query string param value dynamically (based on the params of the parent page), I am using a document.write statement to write the iframe tag from the page page, so I can dynamically set the iframe URL. Note that the iframe URL should be fully qualified (so including https and the exact domain). – Gert-Jan Apr 25 '22 at 11:00

0 Answers0