• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Omer
#1 Posted : Wednesday, April 21, 2010 2:18:31 AM(UTC)
Omer

Rank: Member

Joined: 2/3/2007(UTC)
Posts: 100

Here's an example title tag from the live site
<title>
this is title
</title>

I want it to look like
<title>this is title</title>

I found a script that would remove the white space after <title> and before </title>
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)

Dim stringWriter As New System.IO.StringWriter()
Dim htmlWriter As New HtmlTextWriter(stringWriter)
MyBase.Render(htmlWriter)
Dim html As String = stringWriter.ToString()
Dim t1 As Integer = html.IndexOf("&lt;title&gt;")
Dim t2 As Integer = html.IndexOf("</title>") + 8
Dim newTitleTag As String = html.Substring(t1, t2 - t1)
html = html.Replace(newTitleTag, String.Format("<title>{0}</title>", Me.Title))

writer.Write(html)


End Sub

I tested this on the dev server. I added this code to Category.master.vb as it is above. It gives an error referring to the line starting with 'html' ...towards the end: 'me.Title'
Title is not a member of --class name--
I tried Page.Title instead of Me.Title .... it didn't work either.

What am I doing wrong?
ttillman
#2 Posted : Thursday, April 22, 2010 8:42:56 AM(UTC)
ttillman

Rank: Member

Joined: 4/10/2009(UTC)
Posts: 120
Location: Mechanicsville, VA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
There is no difference between these two statements, from an html standpoint. Line breaks like this are ignored by a compiler.

Are you seeing a difference in the Title after a browser interprets the code?


Tim
Omer
#3 Posted : Thursday, April 22, 2010 11:37:54 AM(UTC)
Omer

Rank: Member

Joined: 2/3/2007(UTC)
Posts: 100

Page does not come up. It just gives an error pointing to the error line.

Don't know asp.net that much. Could not figure it out.
ttillman
#4 Posted : Monday, April 26, 2010 1:12:49 PM(UTC)
ttillman

Rank: Member

Joined: 4/10/2009(UTC)
Posts: 120
Location: Mechanicsville, VA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
No sure where the error is, but this seems unnecessary. The <title> tag is being built by .net from the category names, within the category template, not the master file. Don't edit the master page. Do you have extra characters in your category name?


Tim
ttillman
#5 Posted : Monday, April 26, 2010 1:14:32 PM(UTC)
ttillman

Rank: Member

Joined: 4/10/2009(UTC)
Posts: 120
Location: Mechanicsville, VA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
I checked the title of one my pages... it does look like this, physically in the html.

<title>
Cat Name
</title>

However, the title within the browser displays properly without any extraneous line breaks, like I said before.


Tim
Omer
#6 Posted : Monday, April 26, 2010 3:40:24 PM(UTC)
Omer

Rank: Member

Joined: 2/3/2007(UTC)
Posts: 100

What I was trying to do is to remove all unnecessary spaces in the html code to increase the page speed suggested by Google. My tests actually show that after removing all white space in and between tags, the page size is reduced between 20% to 30% depending on the content of course. That's the reason. I guess I can leave 'title' alone and look at how to customize the other parts of the html output :) Thanks for the input Tim.
Matt@9BallDesign
#7 Posted : Monday, April 26, 2010 3:58:23 PM(UTC)
Matt@9BallDesign

Rank: Member

Joined: 12/23/2003(UTC)
Posts: 909

Are you "forcing image sizes"?
Matt Martell


http://www.9balldesign.com - Web, Print, Graphic


http://www.martellhardware.com/ - Decorative &amp; Builder's Hardware

------------------------------------------------
Omer
#8 Posted : Monday, April 26, 2010 5:42:29 PM(UTC)
Omer

Rank: Member

Joined: 2/3/2007(UTC)
Posts: 100

I do it on Cart page and cross selling product images on the product pages. Everything else is original images. I hope I understand your question correctly.
Matt@9BallDesign
#9 Posted : Monday, April 26, 2010 7:50:53 PM(UTC)
Matt@9BallDesign

Rank: Member

Joined: 12/23/2003(UTC)
Posts: 909

You've stated that you're working to improve your page speed.


Having all of your thumbnail images the same dimensions and activating "Force Image Sizes" which is located in the "Dashboard &gt; Options &gt; Images", will help with your page speed.



You may notice that on your category pages that your products may "fly in" from the right of the screen. Following what I mentioned above takes the guesswork out of the table equation for the browser and you'll see load time improvements.
Matt Martell


http://www.9balldesign.com - Web, Print, Graphic


http://www.martellhardware.com/ - Decorative &amp; Builder's Hardware

------------------------------------------------
Omer
#10 Posted : Monday, April 26, 2010 10:07:45 PM(UTC)
Omer

Rank: Member

Joined: 2/3/2007(UTC)
Posts: 100

Thank you Matt.

You have a point about forcing image sizes. While all of my small size images are 140 x 140, not all of the medium sized images are in same size. So I can't force the image sizes because of that. or is there a way to force the image size JUST for the small size and leave the medium size alone?
Matt@9BallDesign
#11 Posted : Tuesday, April 27, 2010 8:48:16 AM(UTC)
Matt@9BallDesign

Rank: Member

Joined: 12/23/2003(UTC)
Posts: 909

I don't think you can isolate the images through the dashboard like you're thinking.

This may help, but not positive. open up your stylesheet and locate your category grid display formatting.

Add this line:

#categorygridtemplate .record .recordimage img {width: 140px !important; height: 140px !important;}
Matt Martell


http://www.9balldesign.com - Web, Print, Graphic


http://www.martellhardware.com/ - Decorative &amp; Builder's Hardware

------------------------------------------------
Omer
#12 Posted : Tuesday, April 27, 2010 10:20:11 AM(UTC)
Omer

Rank: Member

Joined: 2/3/2007(UTC)
Posts: 100

I edited the css file. It seems it worked. Thank you very much.
Matt@9BallDesign
#13 Posted : Tuesday, April 27, 2010 11:09:10 AM(UTC)
Matt@9BallDesign

Rank: Member

Joined: 12/23/2003(UTC)
Posts: 909

yeah it did! night and day difference, just clicked the same category I've been viewing on your site.
Matt Martell


http://www.9balldesign.com - Web, Print, Graphic


http://www.martellhardware.com/ - Decorative &amp; Builder's Hardware

------------------------------------------------
Omer
#14 Posted : Tuesday, April 27, 2010 1:35:22 PM(UTC)
Omer

Rank: Member

Joined: 2/3/2007(UTC)
Posts: 100

Sometimes small details make a lot of difference. Thanks a lot for that tip. I never noticed until you told me.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012