Maybe the description of the problem is not very clear, for example, I want to copy the entire SF
Add this piece of HMTL to my website. If SF is updated, mine will also be updated, and can it remain clickable?
Or can we only implement it by writing a crawler to crawl it and typesetting it ourselves?
Since the subject wants to use a proxy implementation, I use
NodeJS
the middle layer as a proxy here to achieve the subject's needs.Implementation principle
Add a NodeJS middle layer to the project to obtain the SF web page content in real time. The front end uses Ajax to request this middle layer. The middle layer gets the SF HTML and returns it to the front end in the form of a string, and finally binds it to the DOM. To put it simply, it is to use the server to crawl the SF web page content and return it to the front end.
Implementation ideas
You can use the ExpressJS framework, please check the official documentation for specific usage.
Server code:
The front-end code is even simpler:
Finally
The above just provides a simple implementation idea. For specific situations, please make adjustments according to your own technical scenarios. If you use other server-side languages, you can also use this idea to realize the needs of the questioner.
A few ways
First, you can use jQuery's load and select only the required part of the id
Second, you can use an iframe and then use a negative value of margin-top to limit the top, height to limit the bottom, and scrolling="no" to disable scrolling. This method is suitable for the middle section.
The third is to use js to remove the required parts after removing the iframe. This is suitable when only a small part of it is needed.
See: https://stackoverflow.com/que...
https://stackoverflow.com/que...
If it is purely embedded, you can use
iframe
+CSS/JS black technology to remove other irrelevant elements and only display this one.If you want to write it completely into your own website, you can only typesetting it yourself.