Search code examples
amazon-web-servicesamazon-s3hyperlinkno-response

GET request 200 OK but 'failed to load response data' for links


I made a personal website (http://www.soyoungpark.online) using domain bought from GoDaddy and hosted on AWS s3. I set up everything and thought things were working until I put a simple link to my linkedin profile. When I check the network panel, I see that status code is 200 OK but for the response..there is nothing. The code itself doesn't seem to be problematic; it is simple a with href of the desired link. So I am guessing something could be wrong with my AWS s3 settings? Anyone with similar experience?


Solution

  • It's likely that these services include a header option called "X-Frame" that for security prevents them from being loaded within another site:

    The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe> or <object> . Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites. Source: X-Frame-Options

    This does look to be the case when attempting to view Linkedin per your example:

    Refused to display 'https://www.linkedin.com/in/exampleuser' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
    

    That said, applying a target Attribute to each to open in a new tab or window should allow these outside services to be navigated to.

    e.g:

    <a href="https://www.linkedin.com/in/exampleuser" target="_blank">