Skip to content

View Source on Chrome

Ran into something interesting yesterday. On Chrome, when you view source, Chrome does a GET request on the current URL. However, on a dynamic page that was reached by a POST request, that often won’t work. For example, Magento’s order success page is reached by a PHP POST request. When you do a GET on that page, Magento redirects you to the (now empty) cart page. So a view source request on the success page won’t show up. If you’re trying to do something like add a tracking pixel to the page, this can trip you up.

The proper way to ‘view source’ on Chrome is to use the firebug-like Javascript Console (View->Developer->Javascript Console)

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*