oracle765 Posted June 7, 2020 Share Posted June 7, 2020 hi professionals, not sure if i have posted in the right section as i am stuck with some css and iframe Basically i am trying to use a third party iframe from my sub domain which works fine but i am failing the lighthouse speed check with the message Preload Key Requests My iframe when i try to put preload doesnt work and breaks CSS, just wondering if there is a way around it <iframe title="campervanhire" height="400" src="https://MYSUBDOMAIN.compareandchoose.com.au/affiliates.html?rel=search&selected_country=AU&style=https%3A%2F%2Fwww.compareandchoose.com.au%2Fcss%2Fmotor.css"></iframe> Anyone have any ideas Quote Link to comment Share on other sites More sharing options...
requinix Posted June 7, 2020 Share Posted June 7, 2020 Fails with what message? What "doesn't work" and exactly what does "breaks CSS" mean? Quote Link to comment Share on other sites More sharing options...
oracle765 Posted June 8, 2020 Author Share Posted June 8, 2020 ok i am trying to load the iframe, the below works fine <iframe title="campervanhire" height="400" src="https://MYSUBDOMAIN.compareandchoose.com.au/affiliates.html?rel=search&selected_country=AU&style=https%3A%2F%2Fwww.compareandchoose.com.au%2Fcss%2Fmotor.css"></iframe> I tried pre-loading the frame and then the css IE <link rel="preload" href="https://MYSUBDOMAIN.compareandchoose.com.au/affiliates.html?rel=search&selected_country=AU" as="document"> <link rel="preload" href="https://www.compareandchoose.com.au/css/motor.css" as="style" /> but i get stuck there because it breaks the layout/styling of the iframe, so not sure if there is another way around this Quote Link to comment Share on other sites More sharing options...
requinix Posted June 8, 2020 Share Posted June 8, 2020 Why are you preloading two different URLs? That don't match what you're using for the IFRAME? Quote Link to comment Share on other sites More sharing options...
oracle765 Posted June 11, 2020 Author Share Posted June 11, 2020 ok i understand but still confused If i load the iframe from the .com.au domain to the 3rd party subdomain IE motorhomes. is the cname all for .com.au i get really low page speed saying preload key requests <iframe src="//motorhomes.compareandchoose.com.au/affiliates.html?rel=search&selected_country=US&pickup_location=Orlando&dropoff_location=Orlando&style=https%3A%2F%2Fwww.compareandchoose.com.au%2Fcss%2Fmotor.css"></iframe> So basically this on on the same domain above produces the perload key requests error but if i load it where the source is from the .com.au domain but pointing it to the com domains code there is no preload key requests error <frame src="//motorhomes.compareandchoose.com/affiliates.html?rel=search&selected_country=US&pickup_location=Orlando&dropoff_location=Orlando&style=https%3A%2F%2Fwww.compareandchoose.com%2Fcss%2Fmotor.css"></iframe> So i guess with the motorhomes. cname on its own server the browser is thinking its the same place and asking for the preload am i totally wrong here Quote Link to comment Share on other sites More sharing options...
requinix Posted June 11, 2020 Share Posted June 11, 2020 Use the correct domain name for the URL. I don't know what it is. You might not even know what it is. But one of those two should be the "proper" domain. If your tool thing complains about preloading then add preloading. Which you do by preloading the actual URL that your page wants to load. Not that it makes sense to preload something that's being embedded right into the page... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.