Why some content doesn't display

Sometimes, when you request a rewordified page, some parts of the page display strangely, or not at all. Here's why.

When you request a rewordified page, here's what happens:

  • Our server reads the page you requested;
  • Our server locates all the text on the page;
  • Our Rewordifying Engine simplifies that text, and;
  • Our server sends the rewordified web page to you.

This works well in almost all cases, except for something called Javascript.

Javascript is a program that runs in your web browser, and it waits for instructions that it reads within web pages. Within most web pages, in addition to the components you see like pictures and text, are instructions that tell Javascript to do things to the web page. For example, Javascript can cause some page components to appear and disappear, or change color when you hover your mouse over them.

Javascript can also change parts of the web page itself. For example, a web page can have instructions that tell Javascript to create whole new sections of the page and fill it with content.

None of this (almost) is interrupted by Rewordify.com. We do not tamper with or modify a site's Javascript. We leave all Javascript alone for it to run like it is supposed to...except for one problem:

Let's say you're looking at a rewordified version of www.AwesomeWebSite.com. Since your browser sees the page coming from www.rewordify.com, Javascript assumes that www.AwesomeWebSite.com is hosted at www.rewordify.com and not at www.AwesomeWebSite.com.

So, if the Javascript instructions within www.AwesomeWebSite.com tell Javascript to do something like this...

"Look in the /resources directory of the website and print out /resources/coolimage.jpg."

...the Javascript engine will look for "www.rewordify.com/resources/coolimage.jpg" instead of "www.AwesomeWebSite.com/resources/coolimage.jpg."

The result? The image "coolimage.jpg" won't display because Javascript is looking within the wrong web server.

This is only an issue for those page components that are populated from asking Javascript to look in places that begin with the current window's location (Javascript: window.location, etc.) and then go from there. We don't go into a page's Javascript code and modify it, so tells the browser to mistakenly looks for things within www.rewordify.com that aren't there.

This isn't an issue for most page components--the ones that explicitly state where the page's resources are--because our Rewordifying Engine modifies those statements so that the page's resources load properly.

If web programmers want to ensure that all page components load and work correctly within Rewordify.com, they should explicitly state where all page components load, and not rely on window.location, etc., to report it.


2 comments:

  1. This is a fantastic website, could you be interested in going through an interview concerning just how you made it? You can visit my site.
    changeparts

    ReplyDelete
    Replies
    1. Sorry about the delay in answering, but I was working very hard over the weekend to get out the site upgrade. To contact me, go to rewordify.com and click on the "contact" link. Send me your email or phone number, and we can talk. Thank you very much for your kind words about the site, Tasnim.

      Delete