• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web browser internal

 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like to know how the web browsers which are the real clients, work. If you can send me a url containing these information that will be appreciated.

The actions refresh, back, clicking on a hyperlink, clicking on a button, submitting a form etc may or may not create an HttpRequest. I like to know which among these actions create requests and which utilizes the information in browser cache.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64958
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to General Computing
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most commands/actions in a browser window that load a page (refresh, submit, clicking a link) in any way create a HttpRequest with the exception of the back button. Images are not re-requested if the image is all ready in the cache.

This 'hole' in the back buttons means someone can work with live data, change it, then use the back button to see the old data which is clearly out of sync with the server, and then work with that or resubmit it leading to potentially very corrupt data. As a contrived example, imagine you work with data such as a server-stored session shopping card (not a cookie). You then delete an item in the card. You then use the back button to modify items that have been deleted. The server may not be able to handle this confusing behavior because you have deleted items you now want to update.

As a 'fix', many application servers disable the back button in one way or another that avoid this behavior. For example, I'm sure many of you have tried to hit the back button while placing an order and gotten an error message or a blank page saying not to use the back button. What is happening here is that the javascript on the page is set to detect when the page has been reloaded and either display an error message or force a reload of a page that would normally be available in the cache.

Therefore, there are artificial occassions where the back button will trigger a refresh from the server.
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response. Here are some more questions.
1. I am assuming that when back button is hit the browser redisplays the previous page from the cache. Is the whole page is being stored in cache?

2. A back operation succeeding a Get operation is normally successful. But a back succeeding a Post operation is not. Why does it differ? I know the parameters are in the http header during a 'Get'; the parameters are in the http body during a post operation. But how does it matter to the browser whether only "only header is in http request" or "both header and body is in http request".

3. In java ranch form posts, while we are creating a postable item (clicking post reply), we can actually go back and forward before form submission, without the new data being lost. You can click on post reply, the "post a reply" page with input text area will be displayed; You type in your text then click back, then forward; You will see that your typed in new data is preserved. How is this data preservation accomplished?

4. When we type in a url representing a page containing one picture, how many requests go to the server? How does the browser identify the url for the picture?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic