Can this be created in javascript. A timer?

Does this serve any purpose in the below code?
<a href="https://www.google.com/"></a>

<script>
console.time("Page load");
</script>

<a href="https://www.google.com/"></a>
<div id="report">Measuring...</div>

<script>
  window.onload = function() {
   console.timeEnd("Page load");
  }
</script>

No it doesn’t.

How would I be able to measure a sites speed externally? Without going under the hood?

That can’t be done without going under the hood.

How come there are a million sites where you can put your site in and it tells you how fast it loaded?

They obviously don’t go under the hood.

They use other techniques that are not available to client-side scripting. They use server-side scripting instead, using a variety of languages like PHP, or C# for example.

Would I be able to attach this to an iframe with a site in it and measure how fast that loads?

<script>
console.time("Page load");
</script>

<div id="report">Measuring...</div>
<script>
  window.onload = function() {
   console.timeEnd("Page load");
  }
</script>

Most sites use frame busting techniques that prevent that from happening.

There used to be a plague of sites that would put advertising around google, for example, so frame busting techniques were used to prevent external sites from putting them in frames.

1 Like

How would you explain this phenomenon, please explain?
https://testpage34567.blogspot.com/

Click on the image links.

<div style="width:260;margin-top:8px;" onclick="myscr2=document.getElementById('myscroll2'); myscr2.style.display='block'; this.style.display='none'">

<a href="https://bloggersiteinsideiframe.blogspot.com/" style="background-image: linear-gradient( to right,#000000 0 ,#000000 83px,#0059dd 83px, #0059dd 86px, #000000 86px, #000000 174px, #0059dd 174px, #0059dd 177px, #000000 177px, #000000 260px );display:block;height: 168px;border: 3px solid #0059dd; cursor: pointer;   border: 3px solid #0059dd;font-family:Tahoma; font-weight: bold;font-size:30px; color:#0059dd;text-align: center;line-height:100px;text-decoration: none;" target="frame2">Links</a></div>

<div id="myscroll2" style="display: none;">
<iframe style="display:block;border:0;margin-top:8px;" width="266" height="174"name="frame2"  ></iframe>
</div>

You mean, like the G+ image link that opens up to a separate window at plus.google.com ?

yes.

That’s a blogger site owned by Google inside an iframe.

What do you think needs explaining with that?

You said Google blocks the ability to do that.

Where did I say that Google blocks that?

here.

The G+ link opens a new window to:
https://plus.google.com/share?app=110&url=http%3A%2F%2Ftestpage34567.blogspot.com%2F2017%2F11%2Ffghgfhfghfgh.html

Which is something that is fully allowed. There are no cross-site frames involved there at all.

I was speaking about frames at that time. It has nothing to do with opening new windows to other sites.

You don’t see this?