Hacker News new | past | comments | ask | show | jobs | submit login

Curious to know whether someone has made a website to compare DDG and Google search results side by side. Anyone on HN want to take up that challenge? This story is definitely not the first DDG against Google story in the last few months.





You could do it pretty trivially with a pair of iframes and a text input

EDIT: I tried to do just this, and both of them blocked it :(

  Refused to display 'https://www.google.com/?q=cheese' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
  Refused to display 'https://duckduckgo.com/?q=cheese' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".

Iframes are pretty much dead on the web for this reason. It's kinda lame, because it means the web platform is incapable of making a web browser, which is sort of the 'turing test' for a platform/programming language.

Not true - people have made browsers in Electron. The permission-denial above would have to be respected by the browser itself; it'd be easy to tell the server your iframe doesn't exist in a page from a different domain. The reason it exists at all, I'd assume, is for the security of the person using the browser. A malicious site could embed a legitimate site within itself, for purposes of misleading the user or scraping information. So if your app is using a highly-controlled iframe within itself, and it has the authority to overrule these blockers (which presumably Electron gives it), then you can do whatever you want.

Also FWIW, iframes can still be useful on the regular web for third-party widgets, as well as same-domain pages.


The fact you have to use Electron kind of makes my point...

If the web is a 'turing complete platform', then it should be possible to run a web browser in a web browser. So Chrome inside Chrome. That could be anywhere between the level of 'webassembly to run the whole thing', or it could be at the level of 'iframes give all the necessary functionality'. Today the first isn't viable because webpages can't make raw TCP sockets. The latter isn't viable because of the way sites can differentiate between iframes and the top level window.

If I have to use a fork/modified copy of Chrome for the outer copy with slightly different rules, then it isn't capable of implementing itself.

Imagine if gcc couldn't compile gcc - you needed to use a seperate compiler-compiler. It's the same thing.




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: