Limit to HTML Header text in APEX Page

I have an APEX page that has a fairly large amount of javascript in the HTML header. After I added some more, the page blows up. Is there a limit to how much you can add. It doesn't look like Page 0 has the limitation. Is there one one on either?
What is the best way around this? Adding the individual page javascript to Page 0 or creating a .js that gets included on that page only.
Thanks!

Large page sizes will DESTROY your perceived performance. High performance apps go way out of their way to improve page load times by:
- Minifying or compressing javasript
- Making sure it is cache-able
- Loading the minimum amount of javascript you need for the page to function, then "lazy loading" (background loading) the rest
- Lazy loading all of the JavaScript files you need for the app on the login page or first page to cache them
- Using gzip compression in the app server
- Using a Content Delivery Network (CDN)
- Reducing HTML size using CSS and other techniques
- Reducing the number of network requests for images using CSS sprites. (more info here: http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/ )
Storing JavaScript in the head of the page flies in the face of almost everyone of those concepts. Have a look at this if you have time:
http://developer.yahoo.com/performance/
Tyler Muth
http://tylermuth.wordpress.com
"Applied Oracle Security: Developing Secure Database and Middleware Environments": http://sn.im/aos.book

Similar Messages

  • Static html with url to apex pages

    I have a table with html content that contains url's to apex pages similar to
    <a href="f?p=115:300:???:PAGE:::P300_PAGE_NAME:test_page>test page</a>
    <a href=f?p=115:300:???:PAGE:::P300_PAGE_NAME:another_test_page">another test page</a>
    Where ??? needs to be the session id.
    I could use wwv_flow.do_substitutions to render the content and use &SESSION. in place of the question marks. Did not like this option as my content is in a CLOB and didn't want to parse all the content if the links are never clicked, also the content could be very large.
    I don't have much control on how the url is generated, only the base path.
    I also thought about building my own procedure to change the link value and then call the original f procedure, similar to:
    <a href="set_session?p=115:300:#SESSION#:PAGE:::P300_PAGE_NAME:another_test_page>another test page</a>
    This set_session procedure would get the session using plsql and then do the substitution and then call the existing f function.
    Is there another solution to have static url's and render the content in an html region so that when clicked the session id is maintained?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    mwooldridge wrote:
    I have a table with html content that contains url's to apex pages similar to
    <a href="f?p=115:300:???:PAGE:::P300_PAGE_NAME:test_page>test page</a>
    <a href="f?p=115:300:???:PAGE:::P300_PAGE_NAME:another_test_page>another test page</a>
    Always post HTML code using <tt>\...\</tt> tags to prevent it being rendered by the forum software.
    Where ??? needs to be the session id.
    I could use wwv_flow.do_substitutions to render the content and use &SESSION. in place of the question marks.How do you retrieve and render the content?
    Did not like this option as my content is in a CLOB and didn't want to parse all the content if the links are never clicked, also the content could be very large.I don't like that option because it uses an undocumented, unsupported API call.

  • ESS iViews HTML Long text description area page

    I want to make an HTML for the long text description for an area page.... But how to make it Multi languague? I mean, I attach trhe HTML to the Area Page, and the HTML its on the KM defined by a resource. But this HTML have only one languague... Do I have to do it in Javascript and get the browser locale and transalte the text on the HTML?
    could be  another way?
    Thanks in advance.
    Edited by: José Francisco Maldonado Vargas on Jul 15, 2009 10:02 AM

    Hi Vivek..
    Go to Content admin -> KM Content -> Documents.
    Upload ur HTML file here ... in any folder... Open Documents -> Public Documents
    then Go to Folder-> New Upload and UPload the document.
    Now to get URL of the Document..
    From the context menu of the document uploaded, go to Details ->Settings -> Properties
    Choose access links -> copy WebDav URL
    Cheers!!
    Ashutosh

  • Tree html header text right justified

    hey ,
    i need to put  the text in the tree header to the right .
    is there any methods to right justified ?
    tried to put some blank in the text-symbols but it didnt work
    any suggustions ?
    Regards
    ASA

    hey ,
    i need to put  the text in the tree header to the right .
    is there any methods to right justified ?
    tried to put some blank in the text-symbols but it didnt work
    any suggustions ?
    Regards
    ASA

  • HTML-DB 1.6 (Apex) Page size and Page Model and monitor size

    Hi everyone,
    We developed our application based on 17 inches monitor. But, today one user told us that she has a 15 inches monitor. Thus, she don't see full page, she has to use the scroll.
    Is it in our model that you can reduce the page size for example 80% size in the page model to fit with 15 inches monitor ?
    Or to define a variable in the page model and have two different buttons one for 15 inches monitor (80% page size) and an other related to 17 inches monitor and more (100% page size) this pourcent should be the value of a variable in the page model ?
    Thanks. Bye.

    Hi Timiche,
    The easiest thing to do would be to make sure that the width of items on the page (especially tables) are set to a percentage and not a fixed px value. This way, the items will spread out to fill the available screen width.
    You should also bear in mind that users can change the resolution of the screens - 640x400, 800x600, 1024x768 etc. It would become a nightmare to try and cater for all possible resolutions and screen sizes by dynamically changing the fixed width dimensions of all objects on a page! I would check what items need to be of fixed width and change all the rest to percentages.
    We tend to inform our users that pages have been designed for a particular resolution - currently 1024x768.
    Regards
    Andy

  • Page failure when attempting to save java script in html header

    Currently there is java script code for a function that is seeded in the html header of a forms page by apex when the form is generated. This code is for the chicken test for the DELETE button.
    The function works as designed, but if I try to "APPLY CHANGES" to the the page definition I get the The page cannot be displayed "Cannot find server or DNS Error". "the url is http://nldg-3.appl.devjones.com:7777/pls/apex/wwv_flow.accept" If I remove the script coding from the HTML header the page will save just fine, but of course no more java script.
    I need to add a java script function to the page and I am unable to do so at this time because of this issue. I can reproduce this error on any of the sample apps that I have loaded into apex.
    the Apache error log contains:
    [Fri Feb 13 06:11:06 2009] [error] [client 172.16.85.122] [ecid: 1234527066:192.168.211.127:31922:0:17188,0] mod_plsql: /pls/apex/wwv_flow.accept HTTP-500 Error Reading Data from Client!!
    The Apache access gets:
    172.16.85.122 - APEX_PUBLIC_USER [13/Feb/2009:06:23:47 -0600] "POST /pls/apex/wwv_flow.accept HTTP/1.1" 500 653
    Apex is version 3.1.2.00.02 and uses on iAS on a Linux server. The Database is 10g. The browser is IE 6.0.2900.2180.
    I have been developing for about 3 months in Apex and this is the first issue of this kind that I have run into. Any help will be greatly appreciated as I have no clue at this time.

    Luis,
    All the forms are created by Apex with a default function in the html header for a delete chicken test as follows:
    <scrpt language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    //-->
    Even though the function is already a part of the page, if I try to save it, it will fail. I will look into the "black list" a little deeper. I have asked around abit as I also had suspected that, but so far all the answers were that it should not be a problem. If I take out the "SCRIPT" word I can get the page to save, but of course the code is worthless at that point.
    Keith

  • Is there a limit to amount of code that can be added to the HTML Header?

    I've got several javascript functions in the HTML Header section of the page attributes. I recently added another function and now receive an HTTP 404 Not Found error at runtime when navigating to the page. When I remove the function the error is gone. I don't think there is anything wrong with the function because even when I copy and rename an existing working function, this error occurs...as if I've exceeded some size limit. Any ideas?

    I now have a better understanding after reading this thread: Javascript as static file or on filesystem?
    As the post indicates, there are essentially two ways of including a .js file:
    1) upload as static file to the workspace or application and refer to it using the #APP_IMAGES# or #WORKSPACE_IMAGES# tag.
    2) put it on the webserver as a file on the filesystem under the images directory and refer to it using the #IMAGE_PREFIX# tag.
    For now (since I don't have permissions to the file server directory) I have created a .js file and uploaded it as a static file in Shared Components. I referenced the file as below, but when I go the page at runtime, none of my functions are being utilized. Is it because the web server is not using this static file yet because of caching? Does it need to be restarted in order to start using the uploaded js file?
    <script type="text/javascript" src="#WORKSPACE_IMAGES#apex_selection_criteria_page.js">
    </script>

  • Page 0 : HTML Header : Javascript

    Hello,
    I've written a little bit of Javascript that pops up a custom window.
    Now, I can put this in the html header of an individual page and it works.
    However, I thought that I could put this in the html header of page 0 and it would then be inherited by every other page in the application.
    This would then mean if I needed to change it, I could change one reference, as opposed to one reference per page.
    It would also mean I could keep all my javascript in one place.
    This doesn't work for me, does this mean that only page items are inherited onto every page?
    Thanks.

    Hello,
    Page 0 will not replicate JavaScript code in the HTML header page or the On Load section. It will replicate JavaScript code within a region's HTML header or footer.
    However, I don't think using page 0 to make JavaScript code available to all pages is the right way to go. The "best practice" is to maintain an external JavaScript code file, and load it on every page using the page template. This is the technique the APEX builder using to load its built-in JavaScript functions. In the Header section of your relevant page template, just add something similar to the following:
    <script src="/i/javascript/MyScripts.js" type="text/javascript"></script>This will give you all the benefits you mentioned in your post.
    Regards,
    Arie.

  • Template / html header

    Hi evryone,
    I have a question about the #HEAD# substitution string in the templates. I am currently having problems in a case where there is existing javascript in the html header when an error page is loaded to catch an error.
    Example :
    In the page, in the HTML header, a javascript function on document ready set the cursor position on the interactive report on the page. If an error happens on this page and the error page i created loads, it gives an error because it cannot find the interactive report item, because its the error page and not the real
    The problem is that when i include the #HEAD#, i get the html header of the page which i want to exclude in the error page case.
    And if i dont incluse the #HEAD#, the apex libraries are not included in the page, and thats problematic.
    Is there a workaround for this other than hardcoding the apex javascript libraries inclusion?
    Like a substituion string which does not include the html header but includes the libraries ?
    Thank you for your help
    Fred

    Hi,
    Ok, sorry.
    I thought that if you copy template to new name, remove #HEAD# from copy and use that copied template to your error page, would fix your problem.
    That way you have different template to normal page and error page.
    It may that I do not still understand, =)
    Sorry
    Br, Jari
    Edited by: jarola on Nov 20, 2009 6:23 AM

  • Javascrip to read Header text in pdf

    Hi all
    I'm new to use javascritp in PDf , i used javascript in Photoshop and illustrator i'm new to PDF
    i need a script to read header text in all pages of pdf where font, fontsize must be same
    Please anyone help me to develop script

    JS has no access to the type face information of text in a file. Best you
    can do is get the font size by analysing the coordinates (quads) that
    define each word on the page.

  • Section Header Text Background Color

    Hi have a catalog that has a running section header that will be placed over a black graphic the width of the page header.  I would like to have a white background box appear the length of the header section text, but not be the full length of the text box defined on the master pages for the header.  I would like to do this in an automated fashion rather than manual placing the graphic around the header text on each page.  It won't work to place a white box under the text as it is part of the background already being a master page item, or am I missing something.  In brief can I have a background color that dynamically adjusts to the length of a text string?
    Thanks,
    Dave

    If that text has a character style (or if it doesn't give it one) make the character style include an underline, then make that underline really thick and give it a baseline shift.  The same technique is commonly used for highlighting.  There's a few other options you can play around with in the underline options too.

  • Embed html code with Oracle Apex report

    hello Everybody,
    Iam wondering if you guys have any idea about embeding my own html code that has a javascript and html stuff in Oracle Apex page.
    Thanks,
    Abdul ALkhateeb

    Abdul,
    This is very common and can be done a few ways. It's actually one of the great things about ApEx - VERY flexible. Please be more specific about what you're trying to do so we could point you in the right direction.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

  • Header text on an angle/cell wall slant?

    In xcel you can orient the text header to be on angle to save room (ie: if column header is named "Number of Guests" and row cell answer is "3") and the cell walls slant accordingly. I can't seem to get this to work in Numbers. Otherwise my spreadsheet goes on for days.
    Help! Thx.

    HI
    1) Resize the Table  and the window to fit the Header text
    2) Use Page Protection option so that the Text does not overflow.
    3) Check with our Functional Consultant , how many lines the Header and Item Text will be max , based on whichu change the layout.
    surya

  • HTML Header

    Can i add some values to HTML Header of my portlet? (For example cookie:
    Set-Cookie: xxxxx=yyyyy; path=/) or how can i add a cookie?

    hello,
    You can create a new HTML template like this :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>#TITLE#</TITLE>
    #PAGE.BASE#
    <!-- add here everything you want-->
    </head>
    <body>
             #BODY#
    </BODY>
    </HTML>After this you have to tell your pages to use this new HTML template.
    HTH

  • Dynamic html header

    How can I generate dynamic html header entries in a page?
    Thanks,
    Art

    See [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=2808228]: a PL/SQL Function Body Shortcut would be the way to go in page HTML Headers.
    For even more flexibility and lower maintenance, consider the other technique mentioned there of placing one of the #REGION_POSITION_nn# placeholders inside the HTML &lt;head&gt; in the page template. A template-less PL/SQL Dynamic Content region can now be set at this display point to generate any header content by calling package code that uses htp. Put this region on page zero for a very generic solution...

Maybe you are looking for

  • Matrox Media Encoder not working in CS4

    Good day, I have just purchased a used RTX2/ CS4 bundle which includes the card and breakout box. I am currently using RTX2/CS3 which I bought way back in 2008 and is still working on my PC with Windows XP Professional (32bit) running Service Pack 3.

  • In need of some help with awesome

    So I got it installed, and I started editing everything, but what I can't seem to figure out, is how to add items to the root-esque "awesome-menu". I see the lines of code in rc.lua but from there I'm lost to say the least lol. The documentation on t

  • Firefox 7 consistantly crashes with flash content

    This is quite frustrating. Ever since the release of FF6 the performance of Firefox with Flash related content literally sucks! The plugin container is ALWAYS crashing consistently. It seems that in Mozilla race to compete with Google Chrome in their

  • Female Mini port to VGA adaptor?

    Hey Everyone I am looking for female Mini port to VGA adaptor, and i wondered if anyone knew if something like this was made? Thanks for any help or suggestions

  • User Decision in a Module Pool

    Hello Guys, I am relatively new to SAP workflows. I am implementing a solution here and I have mixed feelings about the design. I would love to hear some advice on how to proceed or some reassurance that I am going in the right path. Requirement: If