vkefallinos
vkefallinos

Reputation: 737

Is cross window-domain scripting possible?

Lets say for example i have an google search results page opened in a window or a tab in firefox.Is there a way i can retrieve the html code of that tab or window using javascript? I suppose that the webpage html is saved temporarily somewhere in computer memory. Can i load the webpage using memory saved address? Is there a way for javascript to read html files saved in the same folder as the original?For example i have saved the webpage in a folder on my computer.If i create an html file inside the same folder does javascript consider the saved webpage as the same domain?

Upvotes: 2

Views: 201

Answers (2)

tinyd
tinyd

Reputation: 952

There is a custom search API which may help if you specifically want to do Google searches. It appears to have a JSONP implementation which should let you make a cross-domain request, but I haven't tried it out so I'm not sure how well it works.

Upvotes: 0

Sergio Tulentsev
Sergio Tulentsev

Reputation: 230276

No, you most certainly can't do that unless you control both pages. This would be a huge security hole.

Upvotes: 1

Related Questions