Skip to main content

#Iframe0 discussing

I have a problem with accessing individual products on our Marketplace site. It’s built on experience cloud.

The external site is presented in an iframe wrapped in a visualforce page. As a result when a specific products url is clicked rather than go to that product it returns to the home page.

For example to get to the product page for Google Workspace, its link is

https://www.aitechsourcing.com?bf_redirect=%252Fgoogle-google-workspace

However when that is clicked the home page not the product page is returned. That page is

https://AITechSourcing.com

.

Can anyone offer me recommendations on how to have the specific product pages available to display when their link is clicked?

Thanks.

Pete

#Experience Cloud #VisualForce Page #Visualforce #Iframe Src #Iframe
2 comments
  1. Dec 28, 2024, 6:22 AM

    Hi Pete,

    Here are a few recommendations that might help resolve this issue:

    1. Check URL Encoding: Ensure that the URL parameters are correctly encoded. Sometimes, special characters in URLs can cause unexpected behavior.
    2. Verify X-Frame-Options: Ensure that the external site allows being displayed in an iframe. Some websites set the X-Frame-Options HTTP header to prevent being embedded in iframes. You can check this by inspecting the network requests in your browser's developer tools.
    3. Use Apex:iframe: If you're not already using it, consider using the apex:iframe component instead of a standard iframe. This component is designed for embedding external content in Visualforce pages and might handle URL parameters better1.
    4. Update Visualforce Page: Ensure that your Visualforce page is correctly configured to handle URL parameters. You might need to adjust the URL handling logic in your Visualforce page to ensure it correctly parses and redirects to the desired product page.
    5. Test in Different Browsers: Sometimes, browser-specific behaviors can cause issues with iframes. Test the behavior in different browsers to see if the issue persists.
0/9000