/    Sign up×
Community /Pin to ProfileBookmark

iFrame Questions on Bandwidth

Folks,

Say that, I am running a web proxy and my proxy page is 1MB in size. Say the proxy is here:
http://mywebproxy.com/proxy?

Q1.
Now, when that proxy page loads on a user’s screen then naturally 1MB bandwidth would be spend from my server’s monthly bandwidth allocation. Right ?

Q2. Now say that, that particular proxy page fetches:
https://webdeveloper.com/index.html
and say that fetched page is 2MB in size.
That means, user loading:
http://mywebproxy.com/proxy?https://webdeveloper.com/index.html
will cost me 3MB total in bandwidth. Right ?
1MB used for loading the html, css, etc of: http://mywebproxy.com/proxy?
and 2MB will used for loading the html, css, etc. of: https://webdeveloper.com/index.html.
Correct ?

Q3. Now imagine that, that particular proxy page:
http://mywebproxy.com/proxy?
does not contain a web proxy. But an iFrame instead. And the page size is also 1MB.
And that iFrame loads the 2MB page: https://webdeveloper.com/index.html.
Now, how much bandwidth would be spent on this occasion of my web server ?
I think only 1MB would be spent here because my page on my server is 1MB.
And, I think 2MB would be spent on the user’s side. Client side. Web browser side because whatever the iFrame fetches, is not fetched by the server but by the user’s web browser (client).
Am I right ?
This is important. I must know the answer to this.

Q4. When the iFrame loads a webpage, does the fetched page’s code (html, css, etc) get fetched by the server or the web browser (clientside) ? The answer to this should answer my Q3.

Q5. When a web proxy fetches a page, the web proxy replaces the fetched page’s links from something like this:
https://webdeveloper.com/contactus.html
https://webdeveloper.com/aboutus.html
to something like this:
http://mywebproxy.com/proxy?https://webdeveloper.com/contactus.html
http://mywebproxy.com/proxy?https://webdeveloper.com/aboutus.html
That way, all link clicks go through the proxy. I understand this basic about web proxies.
Now, I want to do the same with iFrame fetched pages so that all links visible on the page fetched by the iFrame carries my domain’s tracker.
So, if the iFrame fetches this page (for example):
https://webdeveloper.com/index.html
and if that fetched page contains these original links:
https://webdeveloper.com/contactus.html
https://webdeveloper.com/aboutus.html
then those links should be replaced by the following before getting loaded on the user’s/visitor’s/clientside’s screen:
http://mywebsite.com/tracker?https://webdeveloper.com/contactus.html
http://mywebsite.com/tracker?https://webdeveloper.com/aboutus.html
This way, my website users can browse third party websites via the iFrame on my website and I can track all the links they click on the pages fetched by the iFrame.
And so, how to achieve this task ? Which iFrame code should I be looking into ?
I only know basic html, little css and fair amount of php (procedural style). So, do not give me anything hard to use such as jSON or javascript or whatever. Unless ofcourse, you know that there is no other way.

to post a comment

1 Comments(s)

×

Success!

Help @developer_web 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 4.16,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...