/    Sign up×
Community /Pin to ProfileBookmark

Wrapping other sites

Hello.

I’m creating a tool that takes an URL, fetches the document, modifies its contents and sends it to the browser. I add some tags to the HTML. I have two questions:

1) I want the user to feel as little as possible that they’re not on the original page. I want the links to work, the design to stay the same, the original scripts to work etc. So far I only thought about modifying relative links. But there may be other things that may get broken by the wrapping. So, is there perhaps a library / generic tool for wrapping web pages that does all this for me?

2) I want to add spans and hyperlinks into the original HTML. However, these aren’t allowed everywhere in every document type and I’d love to keep the document valid if it was valid before. So, is there a way to check if the document type allows me to create an element in a particular place?

to post a comment
Full-stack Developer

0Be the first to comment 😎

×

Success!

Help @Sixtease spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...