Current time: 09-18-2019, 02:46 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NoScript and IFrames
06-28-2010, 07:11 AM
Post: #1
NoScript and IFrames
Hey There,

I was thinking about my website menu today. It is a JavaScript menu and I know the majority of users have JavaScript enabled with their browsers. So here are a few questions for discussion.

1. To take into consideration the very small number of users that have JavaScript disabled, many developers use noscript tags. For a JavaScript menu, it may be nice to have at least the top menus within the noscript tag. However, this may bloat the webpages a bit. Would using an IFrame within the noscript tag improve performance overall? I think for JavaScript enabled users, this may be beneficial as the pages would be less bloated with material they do not need. However, for users who have JavaScript disabled, the IFrame creates an extra resource to look up. What are your thoughts on this?

2. I know my Zapatec Menu has JavaScript libraries that create the HTML necessary to display the menu. If I look in firebug I can see the HTML that is generated. If I copy and pasted all of the generated code in place of the JavaScript code that generates this code, what would be the effect? I can see the pages getting a lot more bloated, which would lead to more time to download the main document. The CPU time on the users computer would be smaller.

3. Let's say a user has a menu that has only a top level. This does not have to be a menu - anything in general that has the same code over and over again. Would it be beneficial to place all of this code in an Iframe that can be cached? If a menu is within an IFrame, I do not think it would work if it has drop down menus. I think the drop down menus would be cut off at the bottom of the IFrame. I do not think a z-index would help in this case.

4. Is there anyway you can cache part of a page instead of the entire page? I was reading an adobe article on coldfusion 9 and it was saying that coldfusion 9 is able to cache the processing for part of a page:

http://openflash.org/devnet/coldfusion/a...ching.html

It would be nice if there was a way you could cache part of the page that gets sent to the user. I suppose this is what IFrames are for or is there another way?

Sincerely,
Travis Walters
Find all posts by this user
Quote this message in a reply
06-29-2010, 07:30 AM
Post: #2
RE: NoScript and IFrames
On second thought, this actually would not work with an IFrame because once you click a link in the IFrame the page updates in the IFrame itself and not the parent.

Using JavaScript would be pointless because the IFrame is in the noscript tag.

When I tried this out I had one of those duhhh moments Smile
Find all posts by this user
Quote this message in a reply
06-30-2010, 06:51 AM
Post: #3
RE: NoScript and IFrames
http://www.w3schools.com/tags/att_a_target.asp

_top or _parent should break the iframe if thats your concern...

cdnplanet.com: We help you select the right CDN
Visit this user's website Find all posts by this user
Quote this message in a reply
06-30-2010, 10:33 AM
Post: #4
RE: NoScript and IFrames
I'd avoid using frames, and in my opinion even considering frames as a solution is a convoluted one. For both non-javascript users and those with accessibility problems (like those who don't use mice) it is customary to make the base nav link (the main text the dropdown menu originates from) link to a page that contains the same links that are contained within the dropdown menu itself. That would be my solution to your problem. Though i personally wouldn't use a menu that requires javascript. Almost all browsers support hover, which allows dropdown menus to be made purely with css, and only IE6 (of course) requiring any form of javascript due to its limited use of hover.
Find all posts by this user
Quote this message in a reply
06-30-2010, 01:37 PM (This post was last modified: 06-30-2010 01:38 PM by green-watch.org.)
Post: #5
RE: NoScript and IFrames
I completely forgot that the a href tag could use _top or _parent. I guess this shows how much I use frames - I try to avoid them as much as possible Smile

Thanks Sajal for pointing that out. I may go back and give the iframe another glance sometime soon.

I have considered making a pure CSS based drop down menu in place of the JavaScript menu.

This is something I will probably outsource in the future once my website is actually making a little income.

I can see IE6 being completely phased out in a year or two so I am not really worried about that browser. It is becoming outdated rather quickly.

I suppose removing the JavaScript menu and placing a CSS based menu would make my pages render a bit faster.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)